/* ============================================
   CART — Cart Panel, Cart Overlay, Cart Bar,
          WhatsApp Float
   ============================================ */

/* Cart Panel */
.cart-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background-color: rgb(15, 18, 35);
    z-index: 1003;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-panel.active {
    right: 0;
}

.cart-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(212, 175, 125, 0.2);
}

.cart-panel-header h2 {
    color: white;
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.cart-panel-close {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 5px 10px;
    opacity: 0.7;
}

.cart-panel-close:hover {
    opacity: 1;
}

.cart-panel-content {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 25px;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 20px;
}

.cart-empty img {
    width: 60px;
    height: 60px;
    opacity: 0.3;
    filter: invert(1);
}

.cart-empty p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.cart-empty-link {
    color: var(--gold);
    text-decoration: none;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 20px;
    border: 1px solid var(--gold);
}

.cart-empty-link:hover {
    background-color: var(--gold);
    color: var(--primary-color);
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item-name {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.cart-item-variant {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.cart-item-price {
    color: var(--gold);
    font-size: 14px;
    font-weight: 500;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.cart-item-quantity button {
    width: 28px;
    height: 28px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.cart-item-quantity span {
    color: white;
    font-size: 14px;
    min-width: 20px;
    text-align: center;
}

.cart-item-remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    align-self: flex-start;
}

.cart-panel-footer {
    padding: 25px;
    border-top: 1px solid rgba(212, 175, 125, 0.2);
}

.cart-panel-subtotal {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.cart-panel-subtotal span {
    color: white;
    font-size: 14px;
}

.cart-panel-total {
    color: var(--gold);
    font-weight: 500;
}

.cart-panel-checkout {
    width: 100%;
    background-color: var(--gold);
    color: var(--primary-color);
    border: none;
    padding: 15px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
}

.cart-panel-checkout:hover {
    background-color: var(--gold-light);
}

.cart-panel-note {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    text-align: center;
    margin-top: 15px;
}

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1002;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.cart-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 110px;
    right: 20px;
    z-index: 999;
}

.whatsapp-float a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: whatsappPulse 3.5s ease-in-out infinite;
}

@keyframes whatsappPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
    50% { transform: scale(1.06); box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35); }
}

.whatsapp-float img {
    width: 35px;
    height: 35px;
}

/* Cart Bar (mobile sticky) */
.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 998;
    background-color: rgb(15, 18, 35);
    border-top: 1px solid var(--gold);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}

.cart-bar.active {
    transform: translateY(0);
    opacity: 1;
}

.cart-bar-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-bar-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-bar-icon img {
    width: 28px;
    height: 28px;
    filter: invert(1);
}

.cart-bar-count {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--gold);
    color: var(--primary-color);
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-bar-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-bar-items {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.cart-bar-total {
    color: var(--gold);
    font-size: 16px;
    font-weight: 500;
}

.cart-bar-button {
    background-color: var(--gold);
    color: var(--primary-color);
    border: none;
    padding: 12px 24px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 25px;
}

.cart-bar-button:active {
    background-color: var(--gold-light);
}

/* ============================================
   CART — Cart Items (redesigned with image),
          Shipping Bar, Price Breakdown
   ============================================ */

/* Cart Item */
.cart-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.cart-item-image {
    width: 72px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 175, 125, 0.1);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.cart-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.cart-item-meta {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    color: white;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    line-height: 1.4;
}

.cart-item-sale-tag {
    background: rgba(212, 175, 125, 0.15);
    color: rgb(212, 175, 125);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid rgba(212, 175, 125, 0.3);
    white-space: nowrap;
}

.cart-item-variant {
    color: rgba(255, 255, 255, 0.38);
    font-size: 11px;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-remove-x {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.22);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
    flex-shrink: 0;
    transition: color 0.2s;
}

.cart-item-remove-x:hover {
    color: rgba(255, 255, 255, 0.7);
}

.cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* Quantity stepper */
.cart-item-qty {
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    overflow: hidden;
}

.cart-qty-btn {
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.cart-qty-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.cart-qty-value {
    color: white;
    font-size: 13px;
    font-weight: 500;
    min-width: 26px;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

/* Price in cart item */
.cart-item-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.cart-item-price {
    color: rgb(212, 175, 125);
    font-size: 14px;
    font-weight: 500;
}

.cart-item-price-old {
    color: rgba(255, 255, 255, 0.28);
    font-size: 11px;
    text-decoration: line-through;
}

.cart-item-cop {
    color: rgba(255, 255, 255, 0.3);
    font-size: 10px;
    letter-spacing: 0.5px;
}

/* ---- Shipping Progress Bar ---- */

.cart-shipping {
    margin-bottom: 18px;
}

.cart-shipping-track {
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.cart-shipping-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(212, 175, 125, 0.5), rgb(212, 175, 125));
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 0%;
}

.cart-shipping-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    letter-spacing: 0.3px;
}

.cart-shipping-text.is-free {
    color: rgb(212, 175, 125);
    font-weight: 500;
}

/* ---- Price Breakdown Rows ---- */

.cart-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
}

.cart-price-row span:first-child {
    color: rgba(255, 255, 255, 0.55);
}

.cart-price-row span:last-child {
    color: white;
}

.cart-total-row {
    padding-top: 10px;
    border-top: 1px solid rgba(212, 175, 125, 0.15);
    margin-bottom: 18px;
    font-size: 15px;
}

.cart-total-row span:first-child {
    color: white;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cart-discount-val {
    color: rgb(212, 175, 125) !important;
}

/* ---- Responsive: Cart ---- */

@media (max-width: 599px) {
    .cart-panel {
        max-width: 100%;
    }
}

@media (min-width: 900px) {
    .cart-bar {
        display: none;
    }

    .whatsapp-float a {
        width: 55px;
        height: 55px;
    }

    .whatsapp-float img {
        width: 32px;
        height: 32px;
    }
}

@media (min-width: 1440px) {
    .whatsapp-float {
        right: calc((100vw - 1440px) / 2 + 20px);
    }
}
