:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #ffe66d;
    --text-color: #2d3436;
    --bg-color: #f7f9fc;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.12);
    --border-radius: 20px;
    --gradient-primary: linear-gradient(135deg, #ff6b6b, #ee5a24);
    --gradient-secondary: linear-gradient(135deg, #4ecdc4, #44a08d);
    --gradient-accent: linear-gradient(135deg, #ffe66d, #f9ca24);
    --gradient-hero: linear-gradient(135deg, #fff5f5 0%, #f0fffe 50%, #fffdf0 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

/* Row 1: Logo + Nav */
.header-top {
    border-bottom: 1px solid #f0f0f0;
    padding: 14px 0;
}

.header-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -1px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Navigation links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 7px 14px;
    border-radius: 10px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.nav-links a:hover {
    background: #f5f5f5;
    color: var(--primary-color);
}

.nav-cart {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
}

.cart-badge {
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
}

.nav-btn-outline {
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    padding: 6px 16px !important;
    border-radius: 20px !important;
}

.nav-btn-outline:hover {
    background: var(--primary-color) !important;
    color: white !important;
}

.nav-btn-solid {
    background: var(--primary-color) !important;
    color: white !important;
    padding: 6px 16px !important;
    border-radius: 20px !important;
}

.nav-btn-solid:hover {
    background: #e85555 !important;
    color: white !important;
}

.admin-badge {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
    color: white !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 0.85rem !important;
}

.admin-badge:hover {
    opacity: 0.9;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
    color: white !important;
}

.nav-logout {
    background: none;
    border: 2px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 6px 14px;
    color: var(--text-color);
    font-family: inherit;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.nav-logout:hover {
    background: #fee;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    border-radius: 16px;
    padding: 8px;
    min-width: 185px;
    z-index: 200;
    border: 1px solid #f0f0f0;
}

.dropdown-menu.open {
    display: flex;
}

.dropdown-menu a {
    padding: 10px 14px !important;
    border-radius: 10px !important;
    font-size: 0.9rem !important;
    margin: 0 !important;
}

.dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 6px 0;
}

/* Row 2: Search bar */
.header-search {
    padding: 10px 0;
    background: var(--white);
}

.search-form {
    display: flex;
    align-items: center;
    background: #f5f7fa;
    border: 2px solid #eee;
    border-radius: 14px;
    padding: 6px 10px 6px 16px;
    gap: 10px;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.search-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255,107,107,0.10);
    background: white;
}

.search-icon {
    font-size: 1rem;
    flex-shrink: 0;
    opacity: 0.5;
}

.search-form input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    color: var(--text-color);
    min-width: 0;
}

.search-form input::placeholder {
    color: #aaa;
}

.search-clear {
    color: #bbb;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.search-clear:hover {
    background: #fee;
    color: var(--primary-color);
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 22px;
    font-weight: 700;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.search-btn:hover {
    background: #e85555;
    transform: translateY(-1px);
}

/* ======================== ALERTS ======================== */
.alert {
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 600;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* ======================== FOOTER ======================== */
.site-footer {
    background: var(--white);
    padding: 40px 0;
    margin-top: 80px;
    box-shadow: 0 -5px 30px rgba(0,0,0,0.04);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.5rem;
}


.hero {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, #ff6b6b11 0%, #4ecdc411 100%);
    border-radius: 0 0 50px 50px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 700;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 50px 0;
}

.product-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-image {
    width: 100%;
    height: 250px;
    background: #f0f0f0;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    overflow: hidden;
}

.product-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.product-card .price {
    font-weight: 800;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.category-badge {
    display: inline-block;
    padding: 5px 12px;
    background: var(--accent-color);
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

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

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* ===================== CATALOG PAGE ===================== */
.catalog-hero {
    padding: 70px 0 50px;
    text-align: center;
    background: var(--gradient-hero);
    border-radius: 0 0 50px 50px;
    position: relative;
    overflow: hidden;
}

.catalog-hero::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 250px; height: 250px;
    border-radius: 50%;
    background: rgba(255,107,107,0.08);
}

.catalog-hero::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -60px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(78,205,196,0.08);
}

.catalog-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.catalog-hero p {
    font-size: 1.1rem;
    opacity: 0.7;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Category pill filters */
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 30px;
    border: 2px solid #ddd;
    background: var(--white);
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.filter-pill:hover,
.filter-pill.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255,107,107,0.3);
}

.filter-pill.type-book:hover,
.filter-pill.type-book.active {
    background: var(--gradient-secondary);
    border-color: var(--secondary-color);
    box-shadow: 0 8px 20px rgba(78,205,196,0.3);
}

.filter-pill.type-toy:hover,
.filter-pill.type-toy.active {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(255,107,107,0.3);
}

/* Catalog toolbar (count + sort) */
.catalog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0 10px;
    flex-wrap: wrap;
    gap: 15px;
}

.catalog-count {
    font-size: 0.95rem;
    color: #888;
    font-weight: 600;
}

.catalog-count span {
    color: var(--primary-color);
    font-weight: 800;
}

.catalog-sort select {
    padding: 10px 20px;
    border-radius: 15px;
    border: 2px solid #eee;
    background: white;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.catalog-sort select:focus {
    border-color: var(--primary-color);
}

/* Enhanced product card */
.product-card {
    background: var(--white);
    padding: 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.product-card-img {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    position: relative;
    overflow: hidden;
}

.product-card-img.book-bg {
    background: linear-gradient(135deg, #e8f8f5, #d5f5e3);
}

.product-card-img.toy-bg {
    background: linear-gradient(135deg, #fef9e7, #fdebd0);
}

.product-card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.product-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
    flex-grow: 1;
}

.product-card .price {
    font-weight: 800;
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-top: auto;
    padding-top: 10px;
}

/* Stock badge */
.stock-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
}

.stock-badge.available {
    background: #c3e6cb;
    color: #155724;
}

.stock-badge.low {
    background: #ffeeba;
    color: #856404;
}

.stock-badge.empty {
    background: #f8d7da;
    color: #721c24;
}

/* WA Floating Button */
.wa-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px; height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 8px 25px rgba(37,211,102,0.5);
    text-decoration: none;
    z-index: 9999;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: waPulse 2.5s infinite;
}

.wa-float:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(37,211,102,0.6);
}

@keyframes waPulse {
    0%, 100% { box-shadow: 0 8px 25px rgba(37,211,102,0.5); }
    50% { box-shadow: 0 8px 35px rgba(37,211,102,0.8), 0 0 0 12px rgba(37,211,102,0.1); }
}

/* Stagger animation for cards */
.product-grid .product-card:nth-child(1) { animation-delay: 0.05s; }
.product-grid .product-card:nth-child(2) { animation-delay: 0.10s; }
.product-grid .product-card:nth-child(3) { animation-delay: 0.15s; }
.product-grid .product-card:nth-child(4) { animation-delay: 0.20s; }
.product-grid .product-card:nth-child(5) { animation-delay: 0.25s; }
.product-grid .product-card:nth-child(6) { animation-delay: 0.30s; }



/* ===== Pagination (custom site styles) ===== */
.pagination {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 20px 0;
    justify-content: center;
    align-items: center;
}

.pagination li {
    display: inline-flex;
}

.pagination li a,
.pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 12px;
    background: var(--white);
    color: var(--text-color);
    border: 1px solid #eee;
    text-decoration: none;
    font-weight: 700;
    min-width: 42px;
}

.pagination li a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination li.active span {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination li.disabled span {
    opacity: 0.45;
    cursor: default;
}

