/* 
 * nouā - CSS Fixes 
 * Add this file AFTER style.css or append to end of style.css
 */

/* ============================================
   1. FOOTER LOGO FIX - Resize and align
   ============================================ */
.footer-logo-img {
    height: 50px !important;
    width: auto;
    display: block;
    margin-bottom: 10px;
}

.footer-brand {
    max-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.rtl .footer-brand {
    align-items: flex-start !important;
}

.footer-social {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   2. NAV BAR - Shop dropdown alignment
   (Main nav styling is in header.php)
   ============================================ */
/* Dropdown styling handled in header.php */

/* ============================================
   3. REMOVE WHITESPACE BEFORE FOOTER
   ============================================ */
main {
    min-height: auto;
    padding-bottom: 0;
}

.section:last-of-type {
    margin-bottom: 0;
    padding-bottom: var(--spacing-xl);
}

.contact-page,
.profile-page,
.products-page,
.checkout-page {
    padding-bottom: var(--spacing-xl);
    margin-bottom: 0;
}

/* ============================================
   4. CART - Desktop and Mobile fixes
   ============================================ */

/* Desktop: Cart summary margin from footer */

.cart-page {
    padding-bottom: 40px;
}

/* Mobile Cart Layout */
@media (max-width: 768px) {

    /* Cart grid stack on mobile */
    .cart-grid {
        display: block !important;
    }

    .cart-items {
        margin-bottom: 25px;
    }

    /* Cart item - horizontal flex layout */
    .cart-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 15px !important;
        padding: 15px 0 !important;
    }

    /* Image fixed size on left */
    .cart-item-image {
        width: 80px !important;
        min-width: 80px !important;
        max-width: 80px !important;
        height: 100px !important;
        flex-shrink: 0 !important;
        order: 1 !important;
    }

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

    /* Info section on right */
    .cart-item-info {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 5px !important;
        order: 2 !important;
    }

    .cart-item-name {
        font-size: 0.95rem !important;
        margin: 0 !important;
    }

    .cart-item-price {
        font-size: 0.9rem !important;
        margin: 0 !important;
        color: #666 !important;
    }

    /* Hide separate total column on mobile */
    .cart-item-total {
        display: none !important;
    }

    /* Quantity controls */
    .cart-quantity-controls {
        display: flex !important;
        align-items: center !important;
        margin-top: 8px !important;
    }

    .qty-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 1rem !important;
    }

    .qty-display {
        width: 40px !important;
        height: 32px !important;
        line-height: 32px !important;
        font-size: 0.9rem !important;
    }

    .cart-item-remove {
        margin-top: 8px !important;
        font-size: 0.8rem !important;
    }


}

/* ============================================
   5. SOLD OUT - Gray color (in stock stays green)
   ============================================ */
.sold-out,
.out-of-stock {
    color: #888 !important;
}

/* ============================================
   6. CHECKOUT VALIDATION STYLES
   ============================================ */
.form-input.error,
.form-select.error,
select.error {
    border-color: #c53030 !important;
    background-color: #fff5f5;
}

.field-error {
    color: #c53030;
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
}

/* Short address field - hidden by default */
.short-address-field {
    display: none !important;
}

.short-address-field.show {
    display: block !important;
}

.short-address-helper {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
}

/* ============================================
   7. ALERT STYLING
   ============================================ */
.alert {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* ============================================
   8. RESPONSIVE FOOTER
   ============================================ */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .footer-brand {
        grid-column: 1 / -1;
        max-width: 100%;
        align-items: center;
        text-align: center;
    }

    .footer-logo-img {
        height: 40px !important;
        margin: 0 auto 10px;
    }

    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}