/* ==================== STORE NAVBAR ==================== */
.store-navbar {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--gray-200);
}

.store-navbar .nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
}

.nav-brand i {
    font-size: 1.6rem;
    color: var(--secondary);
}

.nav-center {
    flex: 1;
    max-width: 480px;
    margin: 0 32px;
}

.nav-center .search-bar input {
    border-radius: 50px;
    padding-left: 44px;
    padding-right: 16px;
    height: 42px;
    background: var(--gray-50);
    border-color: var(--gray-100);
}

.nav-center .search-bar input:focus {
    background: var(--white);
    border-color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-action-btn {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gray-50);
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1.1rem;
}

.nav-action-btn:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.nav-action-btn .badge-count {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

.theme-toggle {
    background: var(--gray-50);
}

/* Mobile menu */
.mobile-menu-btn {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--gray-50);
    color: var(--gray-600);
    cursor: pointer;
    border: none;
    font-size: 1.2rem;
}

/* ==================== HERO SECTION ==================== */
.hero-section {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #EC4899 100%);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}

.hero-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text {
    flex: 1;
    color: white;
}

.hero-text .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(255,255,255,0.15);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.hero-text h1 {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 16px;
}

.hero-text p {
    font-size: 1.1rem;
    opacity: 0.85;
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
}

.hero-buttons .btn {
    padding: 14px 28px;
    font-size: 0.95rem;
    border-radius: 50px;
}

.hero-buttons .btn-white {
    background: white;
    color: var(--primary);
}

.hero-buttons .btn-white:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.hero-buttons .btn-ghost-white {
    background: rgba(255,255,255,0.15);
    color: white;
    backdrop-filter: blur(10px);
}

.hero-buttons .btn-ghost-white:hover {
    background: rgba(255,255,255,0.25);
}

.hero-visual {
    flex-shrink: 0;
    width: 320px;
    height: 320px;
    position: relative;
}

.hero-visual .floating-card {
    position: absolute;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    color: white;
    animation: float 3s ease-in-out infinite;
    border: 1px solid rgba(255,255,255,0.15);
}

.hero-visual .floating-card:nth-child(1) {
    top: 10%;
    left: 0;
    animation-delay: 0s;
}

.hero-visual .floating-card:nth-child(2) {
    top: 45%;
    right: 0;
    animation-delay: 1s;
}

.hero-visual .floating-card:nth-child(3) {
    bottom: 5%;
    left: 15%;
    animation-delay: 2s;
}

.floating-card .fc-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.floating-card .fc-title {
    font-size: 0.8rem;
    font-weight: 700;
}

.floating-card .fc-value {
    font-size: 0.7rem;
    opacity: 0.7;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ==================== CATEGORIES BAR ==================== */
.categories-bar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
    padding: 16px 0;
}

.categories-scroll {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--gray-50);
    border: 1.5px solid var(--gray-200);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.category-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.category-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.category-chip i {
    font-size: 0.9rem;
}

/* ==================== PRODUCTS SECTION ==================== */
.products-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
}

.section-header .product-count {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.sort-select {
    padding: 8px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--gray-600);
    font-size: 0.85rem;
    cursor: pointer;
}

/* ==================== PRODUCT GRID ==================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    border: 1px solid var(--gray-100);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-card .product-image {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-300);
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card .discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--danger);
    color: white;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
}

.product-card .wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.product-card .wishlist-btn:hover,
.product-card .wishlist-btn.active {
    color: var(--danger);
    background: white;
}

.product-card .product-info {
    padding: 16px;
}

.product-card .product-category {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.product-card .product-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.product-card .product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
}

.product-card .product-rating i {
    color: #FBBF24;
    font-size: 0.75rem;
}

.product-card .product-rating span {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.product-card .product-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-card .product-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
}

.product-card .product-price .original-price {
    font-size: 0.75rem;
    color: var(--gray-400);
    text-decoration: line-through;
    font-weight: 500;
    margin-left: 6px;
}

.product-card .add-cart-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.product-card .add-cart-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.product-card .stock-info {
    font-size: 0.7rem;
    color: var(--gray-400);
    margin-top: 6px;
}

.product-card .stock-info.low {
    color: var(--warning);
}

.product-card .stock-info.out {
    color: var(--danger);
}

/* ==================== PRODUCT DETAIL MODAL ==================== */
.product-detail-modal .modal {
    max-width: 700px;
}

.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.product-detail-image {
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-300);
    font-size: 4rem;
    overflow: hidden;
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info .detail-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.product-detail-info .detail-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 12px;
    line-height: 1.3;
}

.product-detail-info .detail-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

.product-detail-info .detail-rating i {
    color: #FBBF24;
}

.product-detail-info .detail-rating span {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.product-detail-info .detail-price {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 6px;
}

.product-detail-info .detail-original-price {
    font-size: 1rem;
    color: var(--gray-400);
    text-decoration: line-through;
    margin-bottom: 16px;
}

.product-detail-info .detail-description {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 20px;
}

.product-detail-info .detail-stock {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-detail-info .detail-stock i {
    color: var(--success);
}

.detail-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.detail-actions .btn {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-md);
}

/* ==================== CART SIDEBAR ==================== */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    max-width: 100%;
    height: 100vh;
    background: var(--white);
    z-index: 201;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-xl);
}

.cart-sidebar.active {
    right: 0;
    transform: translateX(0);
}

.cart-overlay.active ~ .cart-sidebar,
.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-header .cart-count {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.75rem;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.cart-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-100);
    animation: slideUp 0.3s ease;
}

.cart-item-image {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    font-size: 1.3rem;
    flex-shrink: 0;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 8px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px;
    transition: var(--transition);
}

.cart-item-remove:hover {
    color: var(--danger);
}

.cart-summary {
    padding: 20px 24px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.cart-summary-row.total {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--gray-900);
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid var(--gray-200);
}

.cart-actions {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-actions .btn {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
}

/* ==================== CHECKOUT MODAL ==================== */
.checkout-modal .modal {
    max-width: 600px;
}

.checkout-items-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.85rem;
}

.checkout-item .item-name {
    color: var(--gray-700);
}

.checkout-item .item-total {
    font-weight: 600;
    color: var(--gray-800);
}

.checkout-total-section {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 16px;
    margin: 16px 0;
}

/* ==================== FEATURES SECTION ==================== */
.features-section {
    background: var(--white);
    padding: 48px 0;
    border-top: 1px solid var(--gray-100);
}

.features-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.feature-item {
    text-align: center;
    padding: 20px;
}

.feature-item .feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.1));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.4rem;
}

.feature-item h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 6px;
}

.feature-item p {
    font-size: 0.8rem;
    color: var(--gray-500);
    line-height: 1.5;
}

/* ==================== FOOTER ==================== */
.store-footer {
    background: var(--gray-900);
    color: white;
    padding: 48px 0 24px;
}

[data-theme="dark"] .store-footer {
    background: #0B0F1A;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-brand h3 i {
    color: var(--secondary);
}

.footer-brand p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.7;
    margin-bottom: 16px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    color: white;
}

.footer-links h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

/* ==================== PROMO BANNER ==================== */
.promo-banner {
    background: linear-gradient(135deg, #F59E0B, #EF4444);
    padding: 12px 0;
    text-align: center;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

.promo-banner i {
    margin-right: 6px;
}

/* ==================== BACK TO TOP ==================== */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 50;
    font-size: 1.1rem;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    background: var(--primary-dark);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .hero-visual {
        display: none;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .product-detail-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .store-navbar .nav-container {
        height: 60px;
    }

    .nav-center {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-search {
        display: block;
        padding: 12px 24px;
        background: var(--white);
        border-bottom: 1px solid var(--gray-100);
    }

    .hero-section {
        padding: 40px 0;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    .hero-text p {
        font-size: 0.95rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-card .product-info {
        padding: 12px;
    }

    .product-card .product-name {
        font-size: 0.85rem;
    }

    .product-card .product-price {
        font-size: 0.95rem;
    }

    .product-card .product-price .original-price {
        display: block;
        margin-left: 0;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .cart-sidebar {
        width: 100%;
    }

    .products-section {
        padding: 20px 16px;
    }

    .categories-scroll {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-card .product-image {
        font-size: 2rem;
    }

    .product-card .add-cart-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}
