/* Components CSS: Buttons, Cards, Inputs, Navbar, Footer */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    text-align: center;
    font-family: var(--font-cta);
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--color-dark-green);
    color: var(--color-primary-white);
}

.btn-primary:hover {
    background-color: #1a5635;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 18px rgba(46, 139, 87, 0.35);
}

.btn-secondary {
    background-color: var(--color-primary-white);
    color: var(--color-dark-green);
    border: 2px solid var(--color-dark-green);
}

.btn-secondary:hover {
    background-color: var(--color-dark-green);
    color: var(--color-primary-white);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 18px rgba(46, 139, 87, 0.2);
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp:hover {
    background-color: #1ebc5a;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
}

.whatsapp-icon {
    width: 16px;
    height: 16px;
}

/* Modern Product Cards */
/* Modern Product Cards - Aesthetic Overhaul */
.modern-product-card {
    background-color: var(--color-primary-white);
    border-radius: 4px; /* Square/Luxury look */
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
    height: 100%;
}

.modern-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
    border-color: #000;
}

.modern-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1/1;
    width: 100%;
}

.modern-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 1.2s cubic-bezier(0.2, 1, 0.3, 1);
}

.modern-product-card:hover .modern-product-image {
    transform: scale(1.12);
}

/* Wishlist Heart Button */
.wishlist-heart {
    position: absolute;
    top: 12px;
    left: 12px; /* Moved to Left */
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    z-index: 10;
    transition: transform 0.2s ease, background 0.2s ease;
}

.wishlist-heart:hover {
    transform: scale(1.15);
    background: #fff0f5;
}

.wishlist-heart .heart-svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #e74c3c;
    stroke-width: 1.5;
    transition: fill 0.2s ease, stroke 0.2s ease;
}

.wishlist-heart.wishlisted .heart-svg {
    fill: #e74c3c;
    stroke: #e74c3c;
}

/* Navbar wishlist icon */
.wishlist-nav-icon {
    position: relative;
    font-size: 1.2rem;
    color: var(--color-text-main);
    cursor: pointer;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.wishlist-nav-icon:hover {
    color: #e74c3c;
}

.wishlist-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #e74c3c;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
}

/* Empty Wishlist */
.empty-wishlist {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--border-radius);
    grid-column: 1 / -1;
}

.empty-wishlist .empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}


.modern-product-info {
    padding: 10px; /* Reduced padding */
    text-align: center;
    display: flex;
    flex-direction: column;
    flex: 1;
}


.modern-discount-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: #000; /* Luxury Black */
    color: white;
    padding: 3px 10px;
    border-radius: 2px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 10;
    letter-spacing: 0.5px;
}

.modern-product-rating-overlay {
    position: absolute;
    top: 12px;
    right: 12px; /* Moved to Right */
    background: rgba(255, 255, 255, 0.95);
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.7rem;
    color: #f39c12;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

.modern-product-title {
    font-size: 0.85rem; /* Smaller font */
    margin-bottom: 4px; /* Reduced margin */
    color: #000000 !important;
    font-weight: 600;
    font-family: var(--font-heading);
    letter-spacing: 0.01em;
    text-transform: uppercase;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modern-product-price {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px; /* Reduced margin */
    margin-top: auto;
}

.price-original {
    font-size: 0.75rem; /* Smaller */
    color: #b5b5b5;
    text-decoration: line-through;
    font-weight: 400;
}

.price-sale {
    font-size: 1rem; /* Smaller */
    color: var(--color-dark-green) !important;
    font-weight: 700;
    font-family: var(--font-body); /* Standard font */
}

.modern-add-to-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px; /* Much more compact button */
    border-radius: 2px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.65rem; /* Tiny text for luxury look */
    transition: all 0.3s ease;
    border: none;
    outline: none;
    text-align: center;
    font-family: var(--font-cta);
    background: #000;
    color: var(--color-primary-white);
}

.modern-add-to-cart-btn:hover {
    background: var(--color-dark-green); /* Turns green on hover */
    transform: none;
    box-shadow: none;
}

.modern-add-to-cart-btn:active {
    transform: translateY(-1px);
}

/* Review System Styles */
.btn-review {
    display: inline-block;
    padding: 6px 15px;
    background: transparent;
    border: 1px solid var(--color-dark-green);
    color: var(--color-dark-green);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s;
}

.btn-review:hover {
    background: var(--color-dark-green);
    color: white;
}

/* Modern Shop Grid */
.modern-shop-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
}

@media (max-width: 1024px) {
    .modern-shop-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .modern-shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    /* Compact mobile product cards */
    .modern-product-info {
        padding: 12px 8px;
    }
    
    .modern-product-title {
        font-size: 0.9rem;
        margin-bottom: 4px;
        /* Ensure long titles don't break the layout */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .modern-product-rating {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }
    
    .modern-product-price {
        margin-bottom: 10px;
    }
    
    .price-original {
        font-size: 0.75rem;
    }
    
    .price-sale {
        font-size: 1rem;
    }
    
    .modern-add-to-cart-btn {
        padding: 8px 10px;
        font-size: 0.72rem;
        letter-spacing: 0.5px;
        border-radius: 20px;
    }
}

/* Navbar */
.navbar {
    background-color: var(--color-primary-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-dark-green);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--color-soft-pink);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-soft-pink);
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-icon {
    font-size: 1.2rem;
    color: var(--color-text-main);
    cursor: pointer;
    transition: color 0.3s;
    position: relative;
}

.nav-search-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-dark-green);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px 10px; /* Reduced from 6px 12px */
    border-radius: 20px;
}

.nav-search-btn:hover {
    background-color: rgba(46, 139, 87, 0.05);
    transform: translateY(-1px);
}

.nav-search-btn svg {
    display: block;
    width: 16px; /* Slightly smaller icon */
    height: 16px;
}

.search-label {
    font-size: 0.8rem; /* Reduced from 0.9rem */
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* React Navbar Search Styling */
.navbar-search {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #eee;
    padding: 1px 1px 1px 10px; /* More compact */
    border-radius: 25px;
    width: 100%;
    max-width: 280px; /* Reduced from 350px */
    transition: all 0.3s ease;
}

.navbar-search:focus-within {
    background: #fff;
    border-color: var(--color-dark-green);
    box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.1);
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    flex-grow: 1;
    gap: 6px;
}

.search-inner-icon {
    color: var(--color-dark-green);
}

.navbar-search input {
    border: none;
    background: transparent;
    padding: 6px 0; /* Reduced from 8px */
    width: 100%;
    outline: none;
    font-size: 0.85rem; /* Slightly smaller font */
    font-family: var(--font-body);
}

.search-submit-btn {
    background: var(--color-dark-green);
    color: white;
    border: none;
    padding: 6px 14px; /* Reduced from 8px 18px */
    border-radius: 20px;
    font-size: 0.75rem; /* Reduced from 0.85rem */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-submit-btn:hover {
    background: var(--color-text-main);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mobile-only-login, .mobile-only-wishlist {
    display: none;
}

.login-icon {
    font-size: 1.2rem;
    color: var(--color-text-main);
    cursor: pointer;
    transition: color 0.3s;
    position: relative;
    display: flex;
    align-items: center;
}

.login-icon:hover {
    color: var(--color-dark-green);
}

.login-icon svg {
    display: block;
    transition: transform 0.3s ease;
}

.login-icon:hover svg {
    transform: scale(1.1);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--color-soft-pink);
    color: var(--color-primary-white);
    font-size: 0.7rem;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Search Bar (Nav Expansion) */
.search-container {
    display: none; /* Toggle via JS */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-primary-white);
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.search-container.active {
    display: flex;
    justify-content: center;
}

.search-box {
    width: 100%;
    max-width: 600px;
    display: flex;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid var(--color-border);
    border-radius: 30px 0 0 30px;
    outline: none;
    font-family: var(--font-body);
}

.search-box button {
    padding: 12px 25px;
    background-color: var(--color-dark-green);
    color: white;
    border: none;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
}

/* Footer */
.footer {
    background-color: var(--color-dark-green);
    color: var(--color-primary-white);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--color-soft-pink);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-col p, .footer-col ul li {
    color: #cbd5e1;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.footer-col ul li a:hover {
    color: var(--color-soft-pink);
    padding-left: 5px;
}

.footer-col ul li a {
    transition: all 0.3s ease;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide on mobile initially */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-primary-white);
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    .nav-links.active {
        display: flex;
    }
    
    .mobile-only-login, .mobile-only-wishlist {
        display: block; /* Show only on mobile dropdown */
    }
    
    .nav-actions .login-icon, .nav-actions .wishlist-nav-icon {
        display: none; /* Hide top icon on mobile */
    }

    .mobile-menu-btn {
        display: block;
    }
    body {
        padding-top: 70px; /* Offset for fixed navbar */
    }
}

/* Custom Notifications */
.custom-toast-container {
    position: fixed;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

/* Desktop positioning */
@media (min-width: 769px) {
    .custom-toast-container {
        top: 20px;
        right: 20px;
    }
}

/* Mobile positioning */
@media (max-width: 768px) {
    .custom-toast-container {
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 400px;
    }
}

.custom-toast {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease forwards;
    border-left: 4px solid var(--color-dark-green);
    width: 100%;
}

.custom-toast.error {
    border-left-color: #e74c3c;
}

.custom-toast.info {
    border-left-color: #3498db;
}

.custom-toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.custom-toast-content {
    flex: 1;
}

.custom-toast-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text-main);
    margin-bottom: 2px;
}

.custom-toast-message {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.custom-toast-close {
    cursor: pointer;
    color: #999;
    font-size: 1.2rem;
    padding: 5px;
    transition: color 0.2s;
    line-height: 1;
}

.custom-toast-close:hover {
    color: #333;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes toastSlideOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

/* Custom Modal */
.custom-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.custom-modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.custom-modal-overlay.active .custom-modal {
    transform: scale(1);
}

.custom-modal-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
}

.custom-modal-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-dark-green);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.custom-modal-close {
    cursor: pointer;
    font-size: 1.5rem;
    color: #999;
    transition: color 0.2s;
    line-height: 1;
    padding: 5px;
}
.custom-modal-close:hover {
    color: #333;
}

.custom-modal-body {
    padding: 25px 20px;
    font-size: 0.95rem;
    color: var(--color-text-main);
    text-align: center;
}

.custom-modal-footer {
    padding: 15px 20px;
    background: var(--color-bg-gray);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.custom-modal-footer .btn {
    min-height: 44px; /* touch friendly */
    padding: 10px 20px;
}
