/* Cart and History Headers */
.cart-header, .history-header {
    text-align: center;
    margin: 20px auto;
    padding: 20px 0;
    font-size: 24px;
    font-weight: bold;
    color: #42a4f3;
    width: 100%;
    display: block;
    background: hsla(240, 7%, 12%, 0.88);
    border-bottom: 7px solid rgba(85, 122, 149, 0.7);
    box-shadow: 0px -1px 4px rgb(200 196 196 / 8%), 0px 4px 4px rgb(200 196 196 / 25%);
    border-radius: 7px;
    margin-bottom: 10px;
}

/* Cart Controls */
.cart-controls {
    text-align: center;
    margin: 20px auto;
    padding: 20px 0;
    width: 100%;
    display: block;
}

.cart-controls .btn + .btn {
    margin-left: 15px;
}

/* Cart and History Main Container */
.cart_main, .history_main {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-around;
    gap: 20px;
    padding: 0px;

}

/* Cart and History Item Styles (replacing swilly-shop-item) */
.cart-history-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-height: 200px;
    min-width: 196px;
    margin-bottom: 15px;
    padding: 10px;
    background: hsla(240, 7%, 12%, 0.88);
    box-shadow: 0px 4px 15px rgb(166 166 166 / 10%);
    border-radius: 10px;
    border-bottom: 7px solid rgba(85, 122, 149, 0.7);
    box-shadow: 0px -1px 4px rgb(200 196 196 / 8%), 0px 4px 4px rgb(200 196 196 / 25%);
}

.cart-history-item-header {
    font-weight: 700;
    font-size: 14px;
    line-height: 17px;
    display: flex;
    align-items: center;
    text-align: center;
    color: #6cdaee;
    margin-top: 15px;
    margin-bottom: auto;
}

.cart-history-item img {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 55px;
    height: 65px;
    margin: auto;
    margin-top: 20px;
    padding-bottom: 10px;
}

.cart-history-item button {
    width: 90%;
    margin: 0 auto;
    background: #7395ae;
    box-shadow: 0px -1px 4px rgb(200 196 196 / 8%), 0px 4px 4px rgb(200 196 196 / 25%);
    border-radius: 4px;
    font-weight: 500;
    font-size: 13px;
    line-height: 12px;
    color: #fff;
    padding: 8px 8px;
    border: none;
    margin-top: auto;
    margin-bottom: 10px;
}

.cart-history-item button:hover {
    background: linear-gradient(to right, #55b2fd, #6573ea);
    color: #fff;
}

.cart-history-item button p {
    margin-bottom: unset;
    margin-right: 5px;
}

/* Cart-specific styles */
.cart-history-item .item-checkbox-container {
    position: absolute;
    top: 0px;
    right: -5px;
}

.cart-history-item .item-details {
    display: flex;
    flex-direction: column;
    margin-top: 15px;
    text-align: center;
    font-size: 11px;
    color: #b4dfe5;
}

.cart-history-item .item-details p {
    margin: 1px 0;
}

.cart-history-item .remove-button {
    margin-top: 5px;
    font-size: 10px;
    padding: 2px 6px;
    background: #d32f2f;
    color: white;
    border: none;
    border-radius: 3px;
}

.cart-history-item .remove-button:hover {
    background: #b71c1c;
}

/* Pagination Styles for Cart/History */
.cart-history-pagination {
    display: flex;
    list-style: none;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    padding-left: unset;
    margin-bottom: unset;
}

.cart-history-pagination li {
    margin-right: 1%;
}

.cart-history-pagination li:last-child {
    margin-right: unset;
}

.cart-history-pagination-button-none {
    border: none;
    outline: none !important;
    background: #4798ee;
    border-radius: 4px;
    min-width: 30px;
    height: 35px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: unset;
    padding: unset;
}

.cart-history-pagination-button-none:disabled {
    background: #4f6fdc;
}

.cart-history-pagination-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #7395ae;
    padding: 0 5px;
    color: #e1e1e1;
}

.cart-history-pagination-buttons p {
    font-weight: 700;
    font-size: 21px;
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: unset;
    color: inherit;
}

.cart-history-pagination-buttons-active {
    color: #FFFFFF;
    background: linear-gradient(to right, #4f6fdc, #4798ee);
}

/* Arrow styles for pagination */
.cart-history-arrow-l {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    align-content: center;
    top: 7px;
}

.cart-history-arrow-l-left {
    position: absolute;
    background-color: transparent;
    top: 11.85px;
    width: 11px;
    display: block;
    transform: rotate(215deg);
    float: right;
    border-radius: 2px;
}

.cart-history-arrow-l-left:after {
    content: "";
    background-color: #000;
    width: 11px;
    height: 3px;
    display: block;
    float: right;
    border-radius: 2px 4px 4px 2px;
    transition: all 0.5s cubic-bezier(0.25, 1.7, 0.35, 0.8);
    z-index: -1;
}

.cart-history-arrow-l-right {
    position: absolute;
    background-color: transparent;
    top: 6px;
    width: 11px;
    display: block;
    transform: rotate(-35deg);
    float: right;
    border-radius: 2px;
}

.cart-history-arrow-l-right:after {
    content: "";
    background-color: #000;
    width: 11px;
    height: 3px;
    display: block;
    float: right;
    border-radius: 4px 2px 2px 4px;
    transition: all 0.5s cubic-bezier(0.25, 1.7, 0.35, 0.8);
    z-index: -1;
}

.cart-history-arrow-r {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    align-content: center;
    top: 7px;
}

.cart-history-arrow-r-left {
    position: absolute;
    background-color: transparent;
    top: 11.85px;
    width: 11px;
    display: block;
    transform: rotate(325deg);
    float: right;
    border-radius: 2px;
}

.cart-history-arrow-r-left:after {
    content: "";
    background-color: #000;
    width: 11px;
    height: 3px;
    display: block;
    float: right;
    border-radius: 2px 4px 4px 2px;
    transition: all 0.5s cubic-bezier(0.25, 1.7, 0.35, 0.8);
    z-index: -1;
}

.cart-history-arrow-r-right {
    position: absolute;
    background-color: transparent;
    top: 6px;
    width: 11px;
    display: block;
    transform: rotate(215deg);
    float: right;
    border-radius: 2px;
}

.cart-history-arrow-r-right:after {
    content: "";
    background-color: #000;
    width: 11px;
    height: 3px;
    display: block;
    float: right;
    border-radius: 4px 2px 2px 4px;
    transition: all 0.5s cubic-bezier(0.25, 1.7, 0.35, 0.8);
    z-index: -1;
}

.cart-history-arrow-rl-off:after {
    background-color: #e1e1e1;
}

/* Pagination Wrapper */
.cart-history-pagination-wrapper {
    text-align: center;
    margin: 20px 0;
}

/* Media Queries */
@media screen and (max-width: 1170px) {
    .cart-history-item {
        width: 32%;
    }
}

@media screen and (max-width: 635px) {
    .cart-history-item {
        width: 48%;
    }
}

@media screen and (max-width: 350px) {
    .cart-history-item {
        width: 100%;
    }
}