/* Cart Overlay Styles */
.cart-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(98, 87, 77, 0.5);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.cart-overlay.active {
    display: flex;
    justify-content: flex-end;
    opacity: 1;
}

.cart-container {
    width: 100%;
    max-width: 400px;
    height: calc(100svh - 40px);
    background-color: #F5F5F5;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border-radius: 20px;
}

/* Cart Header */
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding:20px 20px 20px 30px;
    background-color: #161616;
    color: #fff;
    border-bottom: 1px solid #8B837B;
}

.cart-title {
    display: flex;
    align-items: center;
    font-family: "proxima-nova", sans-serif;
    font-size: .9rem;
}

.cart-title svg {
    margin-right: 10px;
    fill: #fff;
}

.cart-title span {
    color: #fff;
    font-family: "proxima-nova", sans-serif;
}

.cart-close {
    cursor: pointer;
    width: 42px;
    height: 42px;
    display: flex;
    border-radius: 100%;
    padding: 0;
}

.cart-close:hover {
    background-color: #A89133;
}

.cart-close:hover svg path {
    fill: #161616;
}

/* Cart Items */
.scrollable-cart {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 20px 10px;
    border-bottom: 1px solid #e0dbd7;
    position: relative;
    justify-content: stretch;
}

.cart-item-remove {
    cursor: pointer;
    padding: 3px 0 0 2px;
    border: 1px solid #62574D;
    border-radius: 20px;
    text-align: center;
    width: 24px;
    height: 24px;
}

.cart-item-remove:hover {
    background-color: #A89133;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    margin-left: 10px;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-family: "Cirka", Times, serif;
    font-size: 1.2rem;
    margin: 0 ;
}

.cart-item-variant, .cart-item-subscription {
    font-size: 0.8rem;
    color: #8B837B;
    margin-bottom: 3px;
    font-family: 'proxima-nova';
}

.cart-set-components {
    display: none;
    margin-top: 6px;
}

.cart-item-set .cart-set-components {
    display: block;
}

.cart-set-component {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-family: 'proxima-nova', sans-serif;
    font-size: 0.72rem;
    line-height: 1.35;
    color: #8B837B;
}

.cart-set-component img {
    width: 22px;
    height: 22px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

.cart-item-set .cart-item-image {
    width: 66px;
    height: 66px;
}

.cart-item-set {
    align-items: flex-start;
}

.cart-item-set .cart-item-title {
    font-size: 1.05rem;
}

.cart-item-set .cart-item-quantity {
    justify-content: flex-start;
}

.cart-item-set .cart-item-price {
    margin-bottom: 0;
}

.cart-item-price {
    font-weight: 400;
    color: #62574D;
    text-align: right;
    font-family: 'proxima-nova';
    margin-bottom: 10px;
}

.cart-item-quantity {
    display: flex;
    align-items: end;
    margin-left: 10px;
    flex-direction: column;
    justify-content: space-between;
}

.cart-quantity-adjust {
    display: flex;
    border: 1px solid #62574D;
    border-radius: 20px;
    padding: 5px;
}

/* For Chrome, Safari, Edge, Opera */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none !important; 
  appearance: none !important;
  margin: 0 !important; 
}

/* For Firefox */
input[type=number] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

.quantity-decrease, 
.quantity-increase {
    width: 20px;
    height: 20px;
    background-color: #62574D;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    padding: 3px;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #EDE7E3;
}

.quantity-increase svg,
.quantity-decrease svg {
    width: 18px;
    height: auto;
    fill: #EDE7E3 !important
}

.quantity-increase:hover, .quantity-decrease:hover {
    background-color: #161616;
}

.quantity-input {
    width: 30px;
    text-align: center;
    border: none;
    background: transparent;
    margin: 0;
    font-family: "proxima-nova", sans-serif;
    font-size: 1rem;
    text-rendering: geometricPrecision;
    height: 20px;
}

/* Recommendations */
.cart-recommendations {
    padding: 20px 10px 10px;
    background-color: #EDE7E3;
    margin-top: 20px;
    border-radius: 21px;
}

.cart-recommendations h3 {
    font-family: 'proxima-nova';
    font-size: .875rem;
    margin: 0 0 15px;
    text-align: center;
}

.recommendation-items {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.recommendation-item {
    width: calc(47% - 5px);
    flex-shrink: 0;
    background-color: #d8d3ce;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
}

.recommendation-image {
    width: 100%;
    height: 140px;
}

.recommendation-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommendation-details-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: end;
    padding: 10px;
}

.recommendation-details {
    max-width: calc(100% - 45px);
}

.recommendation-title {
    color: #161616;
    font-family: Cirka, serif;
    font-size: 1rem;
    font-style: normal;
    font-weight: 400;
    line-height: 115%; /* 1.15rem */
    margin: 0 0 5px;
}

.recommendation-price {
    color: #62574D;
    font-family: "proxima-nova";
    font-size: 1rem;
    font-style: normal;
    font-weight: 500;
    line-height: 90%; /* 0.73125rem */
}

.recommendation-add-btn {
    background-color: #62574D;
    color: #EDE7E3;
    border: none;
    border-radius: 15px;
    padding: 3px 10px;
    font-size: 0.7rem;
    cursor: pointer;
    font-family: "proxima-nova", sans-serif;
    font-weight: 600;
}

.recommendation-add-btn:hover {
    background-color: #161616;
}

/* Shipping Meter */
.shipping-meter-container {
    padding: 0 20px;
    margin: 20px 0 10px;
}

.shipping-meter {
    height: 25px;
    background-color: #EDE7E3;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.shipping-meter-fill {
    height: 100%;
    background-color: #A89133;
    width: 0%;
    transition: width 0.5s ease;
}

.shipping-meter-text {
    font-size: 0.8rem;
    text-align: center;
    color: #161616;
    font-family: "proxima-nova", sans-serif;
    width: 100%;
    top: 6px;
    position: absolute;
    z-index: 2;
}

.empty-cart {
    text-align: center;
    margin: 6vh 0;
    font-family: "cirka", serif;
    font-size: 1rem;
    color: #62574D;
}

#checkout-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Cart Footer */
.cart-footer {
    padding: 20px;
    background-color: #F5F5F5;
}

.cart-actions {
}

.signinbtn {
    display: inline-block;
    padding: 5px 20px;
    text-align: center;
    border: none;
    border-radius: 30px;
    color: #62574D;
    font-size: .9rem;
    font-family: "proxima-nova", sans-serif;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    border: 1px solid #62574D;
}

.signinbtn:hover {
    background-color: #A89133;
    color: #161616;
}

.checkoutbtn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 30px;
    font-family: "proxima-nova", sans-serif;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    color: #FFF;
    text-align: center;
    leading-trim: both;
    text-edge: cap;
    font-size: 0.8125rem;
    font-style: normal;
    line-height: 90%; /* 0.73125rem */
    letter-spacing: 0.02438rem;
    text-transform: uppercase;
}

.btn-primary {
    background-color: #161616;
    color: #fff;
}

.btn-primary:hover {
    background-color: #A89133;
    color: #161616;
}

.btn-secondary:hover {
    background-color: #f5f5f5;
}

.cart-summary {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.subtotal {
    display: flex;
    flex-direction: column;
    font-family: "proxima-nova", sans-serif;
}

.subtotal span:first-child {
    color: #62574D;
    text-align: right;
    leading-trim: both;
    text-edge: cap;
    font-family: "proxima-nova";
    font-size: 0.725rem;
    font-style: normal;
    font-weight: 500;
    line-height: 90%; /* 0.5625rem */
    padding-bottom: 5px;
}

#cart-subtotal {
    color: #62574D;
    text-align: right;
    leading-trim: both;
    text-edge: cap;
    font-family: Cirka;
    font-size: 1.5rem;
    font-style: normal;
    font-weight: 400;
    line-height: 90%; /* 1.35rem */
}

#checkout-button {
    margin-top: 10px;
}

/* --- Cart recs: snap + nicer scroll --- */
#cart-recommendations .recommendation-items {
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

#cart-recommendations .recommendation-item {
  scroll-snap-align: start;
}

/* Optional: hide scrollbar (keeps scrollable) */
#cart-recommendations .recommendation-items::-webkit-scrollbar { height: 0; }

/* --- Tiny arrow nav --- */
#cart-recommendations { position: relative; }
#cart-recommendations .rec-nav {
  position: absolute; top: -36px; right: 0; display: flex; gap: 8px;
}
#cart-recommendations .rec-nav button {
  appearance: none; border: 0; border-radius: 999px;
  width: 28px; height: 28px; cursor: pointer;
  background: #EDE7E3; color: #62574D; display: grid; place-items: center;
}
#cart-recommendations .rec-nav button:disabled { opacity: .4; cursor: default; }
