/* Cart Icon in Nav */
.cart-icon {
    margin-top: -8px;
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
}

.cart-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #E8A87C;
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
}

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 100vw;
    height: 100vh;
    background: #1a1a1a;
    z-index: 2000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255,255,255,0.1);
}

.cart-drawer.open {
    right: 0;
}

.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.cart-drawer.open + .cart-drawer-overlay,
.cart-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.cart-drawer-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.cart-drawer-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.cart-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #888;
}

.cart-empty p {
    margin-bottom: 1.5rem;
}

.continue-shopping {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid #E8A87C;
    color: #E8A87C;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.continue-shopping:hover {
    background: #E8A87C;
    color: #000;
}

/* Cart Items */
.cart-item {
    display: grid;
    grid-template-columns: 70px 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.cart-item-image {
    width: 70px;
    height: 70px;
    background: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
}

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

.cart-item-details {
    min-width: 0;
}

.cart-item-title {
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.cart-item-variant {
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: #E8A87C;
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-quantity button {
    width: 28px;
    height: 28px;
    border: 1px solid #444;
    background: transparent;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.cart-item-quantity button:hover {
    border-color: #E8A87C;
}

.cart-item-quantity span {
    width: 30px;
    text-align: center;
    color: #fff;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
}

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

/* Cart Footer */
.cart-drawer-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: #1a1a1a;
}

/* Mobile: sticky checkout at bottom */
@media (max-width: 768px) {
    .cart-drawer-footer {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 1rem 1.5rem;
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
        box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
    }
}

/* Free Shipping Progress */
.free-shipping-progress {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.free-shipping-progress p {
    color: #888;
    font-size: 0.85rem;
    margin: 0.5rem 0 0;
    text-align: center;
}

.free-shipping-progress strong {
    color: #4CAF50;
}

.progress-bar {
    height: 6px;
    background: #333;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #E8A87C 0%, #4CAF50 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.free-shipping-unlocked {
    color: #4CAF50 !important;
    font-size: 0.9rem !important;
}

/* Cart Summary */
.cart-summary {
    margin-bottom: 1rem;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cart-total-label {
    color: #888;
    font-size: 0.9rem;
}

.cart-total-amount {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
}

.shipping-row .cart-total-amount {
    font-size: 0.9rem;
}

.shipping-row .cart-total-amount.free-shipping {
    color: #4CAF50;
    font-weight: 700;
}

.tax-row .cart-total-amount {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

.estimated-total-row {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.estimated-total-row .cart-total-amount {
    font-size: 1.25rem;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #E8A87C 0%, #3B9FFF 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(232, 168, 124, 0.4);
}

.checkout-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Cart Notification */
.cart-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 3000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.cart-notification-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #1a1a1a;
    border: 1px solid #E8A87C;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.cart-notification-check {
    color: #4CAF50;
    font-size: 1.2rem;
}

.cart-notification-text {
    color: #fff;
    font-size: 0.9rem;
}

.cart-notification-text strong {
    color: #E8A87C;
}

.cart-notification-view {
    background: #E8A87C;
    color: #000;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
}

.cart-notification-close {
    background: none;
    border: none;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 0.5rem;
}

/* Mobile */
@media (max-width: 480px) {
    .cart-drawer {
        width: 100%;
        right: -100%;
    }
    
    .cart-notification {
        right: 10px;
        left: 10px;
    }
    
    .cart-notification-content {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
}

/* Order Notes */
.cart-notes {
    padding: 0 20px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 15px;
}

.cart-notes label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cart-notes textarea {
    width: 100%;
    min-height: 70px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: white;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

.cart-notes textarea::placeholder {
    color: rgba(255,255,255,0.4);
}

.cart-notes textarea:focus {
    outline: none;
    border-color: rgba(255,255,255,0.4);
}
