/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-container {
    background: white;
    border-radius: 16px;
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: white;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Quick View */
.quick-view {
    padding: 2rem;
}

.quick-view__content {
    display: flex;
    gap: 2rem;
}

.quick-view__gallery {
    flex: 1;
}

.quick-view__details {
    flex: 1;
}

/* Compare Bar - DISABLED (Using new footer compare bar instead) */
/*
.compare-bar {
    position: fixed;
    bottom: -100px;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 6px rgba(0,0,0,0.1);
    padding: 1rem;
    z-index: 1000;
    transition: bottom 0.3s ease;
}

.compare-bar.active {
    bottom: 0;
}

.compare-bar__content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
*/

/* Search Autocomplete */
.search-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.18);
    max-height: 520px;
    overflow-y: auto;
    display: none;
    margin-top: 0.75rem;
    z-index: 1000;
    border: 1px solid rgba(226, 232, 240, 0.8);
    transform-origin: top;
    animation: search-dropdown-pop 140ms cubic-bezier(0.16, 1, 0.3, 1);
}

.search-autocomplete-dropdown.active {
    display: block;
}

.autocomplete-section {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid #e2e8f0;
}

.autocomplete-section:last-child {
    border-bottom: none;
}

.autocomplete-section h4 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.45rem;
}

.autocomplete-item {
    display: flex;
    gap: 0.85rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background 0.16s ease, transform 0.16s ease;
    align-items: center;
}

.autocomplete-item:hover,
.autocomplete-item.focused {
    background: rgba(59, 130, 246, 0.08);
    transform: translateX(2px);
}

.autocomplete-item img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.autocomplete-item__info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.autocomplete-item__name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.93rem;
    line-height: 1.35;
}

.autocomplete-item__meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.75rem;
    color: #64748b;
}

.autocomplete-item__meta .pill {
    background: rgba(96, 165, 250, 0.15);
    color: #1d4ed8;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
}

.autocomplete-item__price {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.95rem;
}

.autocomplete-item-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.7rem;
    border-radius: 8px;
    text-decoration: none;
    color: #1f2937;
    font-weight: 600;
    font-size: 0.9rem;
}

.autocomplete-item-simple:hover,
.autocomplete-item-simple.focused {
    background: rgba(148, 163, 184, 0.16);
    color: #1d4ed8;
}

.autocomplete-empty {
    padding: 1.4rem 1.25rem;
    text-align: center;
    color: #475569;
    font-size: 0.9rem;
}

.autocomplete-empty i {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: #94a3b8;
}

.autocomplete-loading {
    padding: 1.2rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #475569;
}

.autocomplete-loading .spinner {
    width: 18px;
    height: 18px;
    border-width: 2px;
}

@keyframes search-dropdown-pop {
    0% {
        opacity: 0;
        transform: scale(0.98) translateY(-6px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Image Zoom */
.image-zoom-lens {
    position: absolute;
    border: 2px solid #2563eb;
    width: 100px;
    height: 100px;
    display: none;
    pointer-events: none;
    background: rgba(37, 99, 235, 0.1);
}

.image-zoom-result {
    position: absolute;
    right: -350px;
    top: 0;
    width: 300px;
    height: 300px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: none;
    background-repeat: no-repeat;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Countdown Timer */
.countdown-timer {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.countdown-item {
    text-align: center;
}

.countdown-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.countdown-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.7;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Category Cards */
.category-card {
    position: relative;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.category-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.category-card:hover .category-card__image {
    transform: scale(1.1);
}

.category-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    color: white;
}

/* Newsletter */
.newsletter-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem;
    border-radius: 16px;
    color: white;
    text-align: center;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 50px;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary { background: #dbeafe; color: #1e40af; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* Sticky Header */
.header-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.header-sticky.show {
    transform: translateY(0);
}
