/* assets/css/style.css - NovaStore Professional Design System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --secondary: #0f172a;
    --accent: #ea580c;
    --accent-hover: #c2410c;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-alt: #f1f5f9;
    --border: #e2e8f0;
    --border-focus: #93c5fd;
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 6px 12px -2px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 30px -6px rgba(0, 0, 0, 0.12);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

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

ul {
    list-style: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================================
   Top Announcement Bar & Header
   ========================================================= */
.top-bar {
    background-color: var(--secondary);
    color: #e2e8f0;
    font-size: 13px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-links {
    display: flex;
    gap: 20px;
}

.top-bar-links a:hover {
    color: #ffffff;
}

.navbar {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-xs);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #fff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

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

/* Search Bar */
.search-form {
    flex: 1;
    max-width: 540px;
    position: relative;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-alt);
    border: 1.5px solid transparent;
    border-radius: var(--radius-full);
    padding: 4px 6px 4px 16px;
    transition: var(--transition);
}

.search-input-wrap:focus-within {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.search-input-wrap input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    padding: 8px 4px;
    color: var(--text-main);
}

.search-btn {
    background: var(--primary);
    color: #ffffff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    position: relative;
    transition: var(--transition);
}

.action-btn:hover {
    background-color: var(--bg-alt);
    color: var(--primary);
}

.action-icon {
    font-size: 20px;
    position: relative;
}

.badge-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
}

/* Category Navigation Sub-bar */
.nav-sub {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
}

.nav-sub-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    display: inline-block;
    padding: 12px 0;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 14px;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.category-dropdown-trigger {
    background: var(--primary);
    color: #fff;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

/* =========================================================
   Typography, Buttons & UI Components
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-accent {
    background-color: var(--accent);
    color: #ffffff;
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
}

.btn-secondary {
    background-color: var(--secondary);
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #1e293b;
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.btn-danger {
    background-color: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: var(--radius-xs);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

.btn-block {
    width: 100%;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-sale {
    background: #fee2e2;
    color: #dc2626;
}

.badge-new {
    background: #e0f2fe;
    color: #0284c7;
}

.badge-trending {
    background: #fef3c7;
    color: #d97706;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

/* Alert Boxes */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

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

.alert-warning {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

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

/* =========================================================
   Hero Section & Banners
   ========================================================= */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 60px 0 80px;
    overflow: hidden;
    margin-bottom: 40px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37,99,235,0.3) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: rgba(37, 99, 235, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(147, 197, 253, 0.3);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: 46px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 18px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 17px;
    color: #cbd5e1;
    margin-bottom: 28px;
    max-width: 520px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-image-wrap {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255,255,255,0.1);
}

.hero-image-wrap img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hero-image-wrap:hover img {
    transform: scale(1.04);
}

/* Features Strip */
.features-strip {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 48px;
    box-shadow: var(--shadow-xs);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.feature-icon {
    width: 46px;
    height: 46px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.feature-info h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}

.feature-info p {
    font-size: 13px;
    color: var(--text-muted);
}

/* =========================================================
   Categories Grid
   ========================================================= */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 28px;
}

.section-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.category-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    display: block;
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.cat-img-wrap {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin: 0 auto 14px;
    overflow: hidden;
    background: var(--bg-alt);
    border: 3px solid var(--bg-alt);
}

.cat-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-card:hover .cat-img-wrap img {
    transform: scale(1.1);
}

.category-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.category-card p {
    font-size: 12px;
    color: var(--text-muted);
}

/* =========================================================
   Product Cards & Product Grid
   ========================================================= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.product-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
}

.product-thumbnail {
    position: relative;
    aspect-ratio: 1/1;
    background: #f8fafc;
    overflow: hidden;
}

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

.product-card:hover .product-thumbnail img {
    transform: scale(1.06);
}

.product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.wishlist-toggle-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: #ffffff;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

.wishlist-toggle-btn:hover {
    color: var(--danger);
    transform: scale(1.1);
}

.wishlist-toggle-btn.active {
    color: var(--danger);
    background: #fee2e2;
    border-color: #fca5a5;
}

.product-details {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category-tag {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.product-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.35;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px;
}

.product-title a:hover {
    color: var(--primary);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
    font-size: 13px;
}

.stars {
    color: #f59e0b;
    display: flex;
    gap: 2px;
}

.rating-count {
    color: var(--text-light);
    font-size: 12px;
}

.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 14px;
}

.current-price {
    font-size: 19px;
    font-weight: 800;
    color: var(--secondary);
}

.original-price {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
}

.discount-tag {
    font-size: 12px;
    font-weight: 700;
    color: var(--success);
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

/* =========================================================
   Product Detail Page (`product.php`)
   ========================================================= */
.product-detail-wrap {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.gallery-main {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #f8fafc;
    margin-bottom: 16px;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-thumbs {
    display: flex;
    gap: 12px;
}

.thumb-item {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition);
}

.thumb-item.active, .thumb-item:hover {
    border-color: var(--primary);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.25;
    margin-bottom: 12px;
}

.stock-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-bottom: 18px;
}

.stock-in {
    background: #dcfce7;
    color: #15803d;
}

.stock-out {
    background: #fee2e2;
    color: #b91c1c;
}

.detail-price-box {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.detail-current-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--secondary);
}

.detail-original-price {
    font-size: 18px;
    color: var(--text-light);
    text-decoration: line-through;
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #ffffff;
}

.qty-btn {
    width: 38px;
    height: 38px;
    background: var(--bg-alt);
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--border);
}

.qty-input {
    width: 50px;
    height: 38px;
    border: none;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    outline: none;
}

.product-meta-specs {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-muted);
}

.meta-row {
    display: flex;
    margin-bottom: 8px;
}

.meta-label {
    width: 120px;
    font-weight: 600;
    color: var(--text-main);
}

/* =========================================================
   Cart & Checkout Pages
   ========================================================= */
.cart-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 50px;
}

.cart-table-wrap {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    background: var(--bg-alt);
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-align: left;
}

.cart-table td {
    padding: 18px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.cart-product-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-product-img {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border);
}

.order-summary-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.summary-row.total {
    font-size: 18px;
    font-weight: 800;
    color: var(--secondary);
    border-top: 1.5px dashed var(--border);
    padding-top: 14px;
    margin-top: 14px;
}

/* =========================================================
   Toast Notifications
   ========================================================= */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--secondary);
    color: #ffffff;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 14px;
    min-width: 280px;
    animation: slideIn 0.3s ease-out forwards;
    border-left: 4px solid var(--primary);
}

.toast.toast-success {
    border-left-color: var(--success);
}

.toast.toast-danger {
    border-left-color: var(--danger);
}

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

/* =========================================================
   Footer
   ========================================================= */
.footer {
    background: var(--secondary);
    color: #94a3b8;
    padding: 60px 0 24px;
    margin-top: 60px;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 18px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}
