/* ============================================================
   Yasmin Premium — E-commerce Frontend CSS
   Font: Inter (Google Fonts), Bootstrap 5 base
   ============================================================ */

:root {
    --primary:        #6C3FC5;
    --primary-dark:   #4e2d9a;
    --primary-light:  #8B5CF6;
    --accent:         #F59E0B;
    --accent-light:   #FCD34D;
    --success:        #10B981;
    --danger:         #EF4444;
    --surface:        #F8F7FF;
    --surface-card:   #FFFFFF;
    --border:         #E5E0F5;
    --text-primary:   #1A1033;
    --text-secondary: #6B7280;
    --text-muted:     #9CA3AF;
    --shadow-sm:      0 1px 4px rgba(108, 63, 197, 0.08);
    --shadow-md:      0 4px 20px rgba(108, 63, 197, 0.14);
    --shadow-lg:      0 12px 40px rgba(108, 63, 197, 0.20);
    --radius:         14px;
    --radius-sm:      8px;
    --transition:     0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Global ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--surface);
    color: var(--text-primary);
    margin: 0;
    padding-top: 72px; /* offset for fixed navbar */
    -webkit-font-smoothing: antialiased;
}

/* ---- Navbar ---- */
.yasmin-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    height: 68px;
    display: flex;
    align-items: center;
}
.yasmin-nav .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 24px;
}
.yasmin-logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.5px;
}
.store-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: 40px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
}
.store-badge .change-store {
    color: rgba(255,255,255,0.75);
    font-size: 0.75rem;
    text-decoration: none;
    transition: color var(--transition);
    border-left: 1px solid rgba(255,255,255,0.3);
    padding-left: 8px;
    margin-left: 2px;
}
.store-badge .change-store:hover { color: white; }

.cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 40px;
    border: 2px solid var(--border);
    transition: all var(--transition);
}
.cart-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--surface);
}
.cart-count-badge {
    position: absolute;
    top: -6px; right: -6px;
    background: var(--accent);
    color: var(--text-primary);
    border-radius: 50%;
    width: 20px; height: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Page Breadcrumb / Header ---- */
.page-header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
    margin-bottom: 32px;
}
.page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}
.breadcrumb-nav { font-size: 0.83rem; color: var(--text-muted); }
.breadcrumb-nav a { color: var(--primary); text-decoration: none; }

/* ---- Store Selector Landing ---- */
.hero-section {
    text-align: center;
    padding: 80px 20px 40px;
    background: linear-gradient(160deg, #F5F0FF 0%, #EDE8FF 50%, #F8F7FF 100%);
}
.hero-section h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.15;
    letter-spacing: -1px;
}
.hero-section p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 480px;
    margin: 16px auto 0;
}
.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

/* ---- Store Cards ---- */
.store-cards-section {
    padding: 40px 0 80px;
}
.store-card {
    background: var(--surface-card);
    border-radius: var(--radius);
    border: 2px solid var(--border);
    padding: 36px 28px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
.store-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
    color: inherit;
}
.store-card .store-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
    transition: transform var(--transition);
}
.store-card:hover .store-icon { transform: scale(1.15); }
.store-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--text-primary);
}
.store-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0 0 20px;
}
.store-card .btn-shop {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: 30px;
    padding: 9px 22px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition);
    display: inline-block;
}
.store-card:hover .btn-shop {
    box-shadow: 0 6px 20px rgba(108, 63, 197, 0.4);
}

/* ---- Product Cards ---- */
.product-card {
    background: var(--surface-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: var(--primary-light);
}
.product-card .product-img-wrap {
    position: relative;
    overflow: hidden;
    background: #F8F8F8;
    height: 220px;
}
.product-card .product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}
.product-card:hover .product-img-wrap img { transform: scale(1.06); }
.product-card .product-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-card .product-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.product-card .product-category-tag {
    font-size: 0.72rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.product-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}
.installment-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.product-card .card-actions { margin-top: auto; display: flex; gap: 8px; }
.btn-primary-grad {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: 30px;
    padding: 9px 18px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    flex: 1;
    justify-content: center;
}
.btn-primary-grad:hover {
    box-shadow: 0 5px 16px rgba(108, 63, 197, 0.4);
    color: white;
    transform: translateY(-1px);
}
.btn-outline-glass {
    border: 2px solid var(--border);
    background: transparent;
    border-radius: 30px;
    padding: 9px 14px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-outline-glass:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ---- Sidebar Filter Panel ---- */
.filter-panel {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 24px;
    position: sticky;
    top: 84px;
}
.filter-panel h5 {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 10px;
    margin-top: 20px;
}
.filter-cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.88rem;
}
.filter-cat-item:hover,
.filter-cat-item.active {
    background: var(--surface);
    color: var(--primary);
    font-weight: 600;
}
.filter-cat-item .badge-count {
    background: var(--surface);
    color: var(--text-muted);
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 0.72rem;
}
.price-range-inputs { display: flex; gap: 8px; }
.price-range-inputs input {
    width: 50%;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font-size: 0.82rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color var(--transition);
}
.price-range-inputs input:focus {
    border-color: var(--primary);
    outline: none;
}
.btn-apply-filter {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 16px;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-apply-filter:hover { background: var(--primary-dark); }
.btn-reset-filter {
    width: 100%;
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid var(--border);
    border-radius: 30px;
    padding: 9px;
    font-size: 0.82rem;
    font-weight: 500;
    margin-top: 8px;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    text-align: center;
    display: block;
}
.btn-reset-filter:hover { color: var(--danger); border-color: var(--danger); }

/* ---- Product Detail ---- */
.product-detail-img {
    border-radius: var(--radius);
    overflow: hidden;
    background: #F8F8F8;
    border: 1px solid var(--border);
}
.product-detail-img img {
    width: 100%;
    object-fit: contain;
    max-height: 480px;
}
.product-detail-info { padding-left: 8px; }
.product-detail-info .category-badge {
    background: var(--surface);
    color: var(--primary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 14px;
}
.product-detail-info h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}
.price-display {
    background: linear-gradient(135deg, #F5F0FF, #EDE8FF);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 24px;
}
.price-display .main-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}
.price-display .price-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}
.installment-table {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
}
.installment-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.installment-table th {
    background: var(--surface);
    padding: 10px 16px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-align: left;
}
.installment-table td {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    font-weight: 600;
    color: var(--text-primary);
}
.installment-table td:first-child { color: var(--primary); }
.detail-description {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ---- Cart ---- */
.cart-table {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}
.cart-table table { width: 100%; border-collapse: collapse; }
.cart-table th {
    background: var(--surface);
    padding: 14px 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-align: left;
}
.cart-table td {
    padding: 18px 20px;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    vertical-align: middle;
}
.cart-table .product-thumb {
    width: 64px; height: 64px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.cart-total-panel {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 28px;
    position: sticky;
    top: 84px;
}
.cart-total-panel h5 {
    font-weight: 700;
    margin-bottom: 20px;
}
.total-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.total-row:last-of-type { border-bottom: none; }
.total-row.grand {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    border-top: 2px solid var(--border);
    margin-top: 8px;
    padding-top: 14px;
}
.empty-cart {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}
.empty-cart .icon { font-size: 4rem; margin-bottom: 16px; display: block; }
.empty-cart h3 { font-weight: 700; color: var(--text-secondary); }

/* ---- Category Cards ---- */
.category-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 32px 20px;
    text-align: center;
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
.category-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    transform: translateY(-4px);
    color: inherit;
}
.category-card .cat-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F5F0FF, #EDE8FF);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 1.6rem;
    transition: transform var(--transition);
}
.category-card:hover .cat-icon { transform: scale(1.1); }
.category-card h5 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.category-card .count-badge {
    font-size: 0.76rem;
    color: var(--text-muted);
}

/* ---- Flash Alerts ---- */
.flash-alert {
    position: fixed;
    top: 80px; right: 20px;
    z-index: 9999;
    min-width: 280px;
    max-width: 360px;
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    animation: slideInRight 0.3s ease;
}
@keyframes slideInRight {
    from { transform: translateX(100px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* ---- Qty Buttons ---- */
.qty-ctrl {
    display: flex;
    align-items: center;
    gap: 6px;
}
.qty-btn {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: white;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition);
    line-height: 1;
}
.qty-btn:hover { border-color: var(--primary); color: var(--primary); }
.qty-val { font-weight: 700; min-width: 24px; text-align: center; }

/* ---- Pagination ---- */
.pagination-wrap { display: flex; justify-content: center; margin-top: 40px; }
.pagination .page-link {
    border-radius: var(--radius-sm) !important;
    margin: 0 3px;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
}
.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}
.pagination .page-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--surface);
}

/* ---- Search bar ---- */
.search-bar-wrap { position: relative; max-width: 360px; }
.search-bar-wrap input {
    border: 1.5px solid var(--border);
    border-radius: 30px;
    padding: 9px 16px 9px 40px;
    font-size: 0.87rem;
    font-family: inherit;
    transition: border-color var(--transition);
    width: 100%;
}
.search-bar-wrap input:focus { border-color: var(--primary); outline: none; }
.search-bar-wrap .search-icon {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ---- Responsive Tweaks ---- */
@media (max-width: 768px) {
    body { padding-top: 62px; }
    .yasmin-nav { height: 58px; }
    .hero-section { padding: 50px 16px 30px; }
    .hero-section h1 { font-size: 2rem; }
    .filter-panel { position: static; margin-bottom: 24px; }
    .product-detail-info { padding-left: 0; margin-top: 24px; }
    .product-detail-info h1 { font-size: 1.4rem; }
}
