/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f9fafb;
    color: #111827;
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== FLASH TOAST NOTIFICATION ===== */
.flash-toast {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    width: 90%;
    max-width: 500px;
    animation: slideDown 0.4s ease-out;
}

.flash-toast-content {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.flash-toast-icon {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.flash-toast-text {
    flex: 1;
    font-weight: 600;
    font-size: 15px;
}

.flash-toast-close {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.flash-toast-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    to {
        transform: translateX(-50%) translateY(-50px);
        opacity: 0;
    }
}

/* Toast Notifications for AJAX actions */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    max-width: 400px;
    animation: slideIn 0.3s ease-out;
}

.toast-content {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.toast-success .toast-content {
    background: linear-gradient(135deg, #10b981, #059669);
}

.toast-error .toast-content {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.toast-message {
    font-weight: 600;
    font-size: 15px;
}

.toast-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

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

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

/* ===== HEADER ===== */
.header {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #9333ea, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-desktop {
    display: none;
    gap: 1.5rem;
}

.nav-link {
    color: #374151;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #9333ea;
    transition: width 0.3s;
}

.nav-link:hover {
    color: #9333ea;
}

.nav-link:hover::after {
    width: 100%;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-box {
    display: none;
    align-items: center;
    background: #f3f4f6;
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.search-box:focus-within {
    background: #e5e7eb;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.search-input {
    border: none;
    background: transparent;
    outline: none;
    width: 250px;
}

.search-icon {
    margin-right: 0.5rem;
    opacity: 0.6;
}

.icon-btn {
    position: relative;
    padding: 0.5rem;
    border-radius: 9999px;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: #f3f4f6;
}

.icon {
    font-size: 1.3rem;
}

.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.badge-primary {
    background: #9333ea;
}

.btn-small {
    padding: 0.5rem 1.25rem;
    background: #9333ea;
    color: white;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-small:hover {
    background: #7e22ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

/* User Menu Desktop */
.user-menu {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 260px;
    padding: 0.5rem;
    display: none;
    z-index: 1001;
}

.user-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
}

.user-dropdown.active {
    display: block;
    animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-info {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.user-name {
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.user-email {
    font-size: 0.875rem;
    color: #6b7280;
}

.user-links {
    padding: 0.5rem 0;
}

.user-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #374151;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.9375rem;
}

.user-link:hover {
    background: #f3f4f6;
    color: #9333ea;
}

.logout-link {
    color: #ef4444;
}

.logout-link:hover {
    background: #fee2e2;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.mobile-menu-btn:hover {
    background: #f3f4f6;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: #374151;
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu-btn.active .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-btn.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===== MOBILE MENU - FIXED VERSION ===== */
.mobile-menu {
    position: fixed;
    top: 70px;
    right: 0;
    width: 85%;
    max-width: 400px;
    height: calc(100vh - 70px);
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-overlay {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 998;
}

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

.mobile-menu-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    border-bottom: 1px solid #e5e7eb;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #9333ea, #ec4899);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.mobile-user-name {
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.125rem;
    font-size: 0.9375rem;
}

.mobile-user-email {
    font-size: 0.8125rem;
    color: #6b7280;
}

.mobile-search {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    gap: 0.5rem;
    background: white;
}

.mobile-search .search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    font-size: 0.9375rem;
}

.mobile-search .search-input:focus {
    border-color: #9333ea;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.mobile-search-btn {
    padding: 0.75rem 1rem;
    background: #9333ea;
    color: white;
    border-radius: 8px;
    font-size: 1.25rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.mobile-search-btn:hover {
    background: #7e22ce;
}

.mobile-search-btn:active {
    transform: scale(0.95);
}

.mobile-nav {
    padding: 0.5rem 0;
    background: white;
}

.mobile-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #374151;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-size: 0.9375rem;
}

.mobile-link:hover {
    background: #f9fafb;
    border-left-color: #9333ea;
    color: #9333ea;
}

.mobile-link:active {
    background: #f3f4f6;
}

.mobile-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 1.5rem;
}

.mobile-logout {
    color: #ef4444;
}

.mobile-logout:hover {
    background: #fee2e2;
    border-left-color: #ef4444;
}

.mobile-login {
    color: #9333ea;
    font-weight: 600;
}

.mobile-login:hover {
    background: #f3e8ff;
}

.mobile-register {
    color: #10b981;
    font-weight: 600;
}

.mobile-register:hover {
    background: #d1fae5;
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* ===== ALERTS ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #9333ea, #7e22ce);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #7e22ce, #6b21a8);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(147, 51, 234, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #9333ea;
    border: 2px solid #9333ea;
}

.btn-secondary:hover {
    background: #f3e8ff;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-add-cart {
    background: white;
    color: #111827;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-add-cart:hover {
    background: #f3f4f6;
    transform: scale(1.05);
}

/* ===== HERO ===== */
.hero {
    position: relative;
    background: linear-gradient(135deg, #9333ea 0%, #ec4899 50%, #fb923c 100%);
    color: white;
    overflow: hidden;
    padding: 6rem 0;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 600px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-text {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.6;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    opacity: 0.2;
    pointer-events: none;
}

.hero-bg::before,
.hero-bg::after {
    content: '';
    position: absolute;
    border-radius: 9999px;
    filter: blur(100px);
}

.hero-bg::before {
    top: 40px;
    right: 40px;
    width: 300px;
    height: 300px;
    background: white;
}

.hero-bg::after {
    bottom: 40px;
    right: 128px;
    width: 400px;
    height: 400px;
    background: #fbbf24;
}

/* ===== SECTIONS ===== */
.section {
    padding: 4rem 0;
}

.section-gray {
    background: #f9fafb;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.view-all {
    color: #9333ea;
    font-weight: 600;
    transition: all 0.2s;
}

.view-all:hover {
    color: #7e22ce;
    transform: translateX(5px);
}

/* ===== CATEGORY GRID ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.category-card {
    position: relative;
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.3s;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1), rgba(236, 72, 153, 0.1));
    opacity: 0;
    transition: opacity 0.3s;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.category-card:hover::before {
    opacity: 1;
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-name {
    font-size: 1.125rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* ===== PRODUCT GRID ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-image-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f9fafb;
}

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

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

.wishlist-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
    z-index: 10;
}

.wishlist-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.wishlist-btn.active .icon {
    color: #ef4444;
}

.product-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-info {
    padding: 1.25rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.star {
    color: #fbbf24;
}

.rating-value {
    font-weight: 600;
    color: #111827;
}

.rating-count {
    color: #6b7280;
}

.product-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 1rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #9333ea;
}

/* ===== FEATURES ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
}

.feature-card {
    text-align: center;
}

.feature-icon {
    font-size: 3rem;
    background: #f3e8ff;
    width: 70px;
    height: 70px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-text {
    color: #6b7280;
}

/* ===== SHOP PAGE ===== */
.shop-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1rem;
}

.sidebar {
    display: none;
}

.filter-box {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 90px;
}

.filter-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-heading {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #111827;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.filter-option input[type="radio"] {
    accent-color: #9333ea;
}

.filter-select {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    outline: none;
    font-size: 0.9375rem;
}

.filter-select:focus {
    border-color: #9333ea;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.shop-main {
    flex: 1;
}

.shop-header {
    margin-bottom: 2rem;
}

.shop-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.shop-count {
    color: #6b7280;
    font-size: 0.9375rem;
}

/* ===== CART PAGE ===== */
.cart-container {
    padding: 2rem 1rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.empty-cart {
    text-align: center;
    padding: 4rem 1rem;
}

.empty-icon {
    font-size: 6rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-title {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.empty-text {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 1.5rem;
}

.cart-item-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 0.75rem;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.cart-item-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #9333ea;
    margin-bottom: 1rem;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f3f4f6;
    border-radius: 9999px;
    padding: 0.25rem;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-weight: 700;
    font-size: 1.125rem;
}

.qty-btn:hover {
    background: #e5e7eb;
}

.qty-value {
    width: 48px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
}

.remove-btn {
    padding: 0.5rem;
    color: #ef4444;
    border-radius: 9999px;
    transition: background 0.2s;
    font-size: 1.25rem;
}

.remove-btn:hover {
    background: #fee2e2;
}

.cart-item-total {
    text-align: right;
}

.item-total-price {
    font-size: 1.25rem;
    font-weight: 700;
}

.cart-summary {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 90px;
    height: fit-content;
}

.summary-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    color: #374151;
}

.summary-value {
    font-weight: 600;
}

.summary-value.free {
    color: #10b981;
}

.summary-total {
    border-top: 2px solid #e5e7eb;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.summary-total .summary-value {
    color: #9333ea;
    font-size: 1.5rem;
}

.cart-summary .btn {
    margin-top: 1rem;
}

/* ===== AUTHENTICATION PAGES ===== */
.auth-container {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.auth-box {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    width: 100%;
    max-width: 480px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: #6b7280;
    font-size: 1rem;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    outline: none;
    transition: border-color 0.2s;
    font-size: 1rem;
}

.form-input:focus {
    border-color: #9333ea;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.form-input:disabled {
    background: #f9fafb;
    cursor: not-allowed;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    accent-color: #9333ea;
    cursor: pointer;
}

.forgot-link {
    color: #9333ea;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #7e22ce;
}

.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.auth-footer p {
    color: #6b7280;
}

.auth-link {
    color: #9333ea;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-link:hover {
    color: #7e22ce;
}

/* ===== ACCOUNT PAGES ===== */
.account-container {
    padding: 2rem 1rem;
}

.account-header {
    margin-bottom: 2rem;
}

.page-subtitle {
    color: #6b7280;
}

.account-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.account-sidebar {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: fit-content;
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.account-nav-link {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: #374151;
    font-weight: 500;
    transition: all 0.2s;
}

.account-nav-link:hover {
    background: #f3f4f6;
    color: #9333ea;
}

.account-nav-link.active {
    background: #f3e8ff;
    color: #9333ea;
}

.account-nav-link.logout {
    color: #ef4444;
}

.account-nav-link.logout:hover {
    background: #fee2e2;
}

.account-main {
    flex: 1;
}

.account-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.account-form .btn {
    margin-right: 1rem;
}

/* Orders List */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.order-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.order-number {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.order-date {
    font-size: 0.875rem;
    color: #6b7280;
}

.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-shipped {
    background: #e0e7ff;
    color: #3730a3;
}

.status-delivered {
    background: #d1fae5;
    color: #065f46;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.order-body {
    margin-bottom: 1rem;
}

.order-items {
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.order-total {
    font-size: 1.25rem;
    font-weight: 700;
    color: #9333ea;
}

.order-footer {
    display: flex;
    gap: 1rem;
}

/* ===== CHECKOUT PAGE ===== */
.checkout-container {
    padding: 2rem 1rem;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.checkout-form {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form-section {
    margin-bottom: 2rem;
}

.form-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.payment-note {
    background: #fef3c7;
    color: #92400e;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.checkout-summary {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: fit-content;
    position: sticky;
    top: 90px;
}

.summary-items {
    margin-bottom: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.summary-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.summary-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.summary-item-info {
    flex: 1;
}

.summary-item-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.summary-item-qty {
    font-size: 0.75rem;
    color: #6b7280;
}

.summary-item-price {
    font-weight: 700;
    font-size: 0.875rem;
}

.summary-totals {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
}

/* ===== FOOTER ===== */
.footer {
    background: #111827;
    color: white;
    margin-top: 4rem;
}

.footer .container {
    padding: 3rem 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #c084fc, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.footer-text {
    color: #9ca3af;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.footer-heading {
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #9ca3af;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: #1f2937;
    border: none;
    border-radius: 9999px;
    color: white;
    outline: none;
}

.newsletter-btn {
    background: #9333ea;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-size: 1.25rem;
}

.newsletter-btn:hover {
    background: #7e22ce;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
    color: #9ca3af;
}

/* ===== SUCCESS PAGE ===== */
.success-page {
    max-width: 600px;
    margin: 4rem auto;
    text-align: center;
    background: white;
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
}

.success-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #10b981;
}

.success-text {
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.success-info {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.success-info p {
    margin-bottom: 0.5rem;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .cart-item {
        flex-direction: row;
    }
    
    .cart-item-image {
        width: 120px;
        height: 120px;
    }
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
    
    .search-box {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .sidebar {
        display: block;
    }
    
    .shop-container {
        grid-template-columns: 256px 1fr;
    }
    
    .cart-layout {
        grid-template-columns: 2fr 1fr;
    }
    
    .checkout-layout {
        grid-template-columns: 2fr 1fr;
    }
    
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .account-layout {
        grid-template-columns: 250px 1fr;
    }
    
    .hero-title {
        font-size: 3.75rem;
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 0.5s ease-out;
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.hidden {
    display: none;
}

/* ===== PRODUCT DETAILS PAGE ===== */
.product-detail-container {
    padding: 2rem 1rem;
    max-width: 1280px;
    margin: 0 auto;
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.product-images {
    position: relative;
}

.product-main-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 1rem;
    background: #f9fafb;
}

.product-detail-info {
    display: flex;
    flex-direction: column;
}

.product-category-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: #f3e8ff;
    color: #9333ea;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    width: fit-content;
    margin-bottom: 1rem;
}

.product-detail-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.product-detail-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.rating-stars {
    display: flex;
    gap: 0.125rem;
}

.rating-text {
    color: #6b7280;
    font-size: 0.9375rem;
}

.product-detail-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: #9333ea;
    margin-bottom: 1.5rem;
}

.product-detail-description {
    color: #374151;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.product-detail-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f3f4f6;
    border-radius: 9999px;
    padding: 0.5rem;
}

.quantity-selector button {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    transition: background 0.2s;
}

.quantity-selector button:hover {
    background: #e5e7eb;
}

.quantity-selector span {
    width: 60px;
    text-align: center;
    font-weight: 600;
    font-size: 1.125rem;
}

.btn-add-to-cart-detail {
    flex: 1;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #9333ea, #7e22ce);
    color: white;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1.125rem;
    transition: all 0.3s;
}

.btn-add-to-cart-detail:hover {
    background: linear-gradient(135deg, #7e22ce, #6b21a8);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(147, 51, 234, 0.3);
}

.btn-add-to-wishlist-detail {
    width: 56px;
    height: 56px;
    border: 2px solid #e5e7eb;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.2s;
}

.btn-add-to-wishlist-detail:hover {
    border-color: #ef4444;
    background: #fee2e2;
}

.btn-add-to-wishlist-detail.active {
    border-color: #ef4444;
    background: #ef4444;
}

.product-meta {
    display: grid;
    gap: 1rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 0.75rem;
}

.product-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meta-label {
    color: #6b7280;
    font-weight: 500;
}

.meta-value {
    font-weight: 600;
    color: #111827;
}

/* Reviews Section */
.reviews-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.reviews-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.btn-write-review {
    padding: 0.75rem 1.5rem;
    background: #9333ea;
    color: white;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-write-review:hover {
    background: #7e22ce;
}

.reviews-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.overall-rating {
    text-align: center;
}

.overall-rating-number {
    font-size: 4rem;
    font-weight: 800;
    color: #9333ea;
    line-height: 1;
}

.overall-rating-stars {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin: 0.5rem 0;
    font-size: 1.5rem;
}

.overall-rating-count {
    color: #6b7280;
    font-size: 0.9375rem;
}

.rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rating-label {
    min-width: 80px;
    font-size: 0.9375rem;
    color: #6b7280;
}

.rating-progress {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.rating-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #9333ea, #ec4899);
    transition: width 0.3s;
}

.rating-count {
    min-width: 40px;
    text-align: right;
    font-size: 0.9375rem;
    color: #6b7280;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-card {
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: all 0.2s;
}

.review-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.review-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #9333ea, #ec4899);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.review-author-info {
    display: flex;
    flex-direction: column;
}

.review-author-name {
    font-weight: 600;
    color: #111827;
}

.review-date {
    font-size: 0.875rem;
    color: #6b7280;
}

.review-rating {
    display: flex;
    gap: 0.125rem;
    color: #fbbf24;
}

.review-text {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.review-helpful {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
}

.btn-helpful {
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-helpful:hover {
    background: #e5e7eb;
}

/* Review Form Modal */
.review-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.review-modal-content {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.review-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.review-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.btn-close-modal {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: background 0.2s;
}

.btn-close-modal:hover {
    background: #f3f4f6;
}

.star-rating-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.star-input {
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.star-input:hover {
    transform: scale(1.2);
}

.star-input.active {
    color: #fbbf24;
}

.review-textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    outline: none;
    resize: vertical;
    font-family: inherit;
}

.review-textarea:focus {
    border-color: #9333ea;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.review-modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Related Products */
.related-products {
    margin-top: 4rem;
}

.related-products-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

/* Responsive adjustments for product detail */
@media (min-width: 768px) {
    .product-detail-layout {
        grid-template-columns: 1fr 1fr;
    }
    
    .reviews-summary {
        grid-template-columns: auto 1fr;
    }
    
    .product-detail-actions {
        flex-direction: row;
    }
}

@media (max-width: 640px) {
    .product-detail-title {
        font-size: 1.5rem;
    }
    
    .product-detail-price {
        font-size: 2rem;
    }
    
    .product-detail-actions {
        flex-direction: column;
    }
    
    .btn-add-to-cart-detail {
        width: 100%;
    }
    
    .btn-add-to-wishlist-detail {
        width: 100%;
        height: 56px;
    }
    
    .flash-toast {
        top: 80px;
        width: 90%;
    }
}
    
    