/**
 * eShop Modern Theme — Base Styles
 * ==================================
 * All custom CSS for the modern frontend theme lives here.
 * This keeps individual view files clean — they only use Tailwind utility classes.
 */

/* ── BASE RESET ──────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif;
    -webkit-tap-highlight-color: transparent;
    background-color: #fdf8ff; /* var: surface */
    color: #1d1a22;             /* var: on-surface */
}

/* ── MATERIAL SYMBOLS ────────────────────────────────────── */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 1;
}

/* ── SCROLLBAR UTILITIES ─────────────────────────────────── */
.carousel-container::-webkit-scrollbar,
.no-scrollbar::-webkit-scrollbar,
.custom-scrollbar-hidden::-webkit-scrollbar {
    display: none;
}
.carousel-container,
.no-scrollbar,
.custom-scrollbar-hidden {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Thin custom scrollbar for sidebar / overflow panels */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cec3d0; /* outline-variant */
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #ad03de; /* primary */
}

/* ── SEARCH DROPDOWN ─────────────────────────────────────── */
#search-results-dropdown {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* ── PRODUCT CARD HOVER ──────────────────────────────────── */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover {
    transform: translateY(-4px);
}

/* ── PRODUCT GRID — equal height rows ───────────────────── */
/* Grid row height = tallest card in that row.
   Cards must fill the row cell fully using height:100% */
.product-section-grid {
    display: grid;
    align-items: stretch;
}
.product-section-grid > div {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ── FILTER CHECKBOX ACCENT ──────────────────────────────── */
input[type="checkbox"],
input[type="radio"] {
    accent-color: #ad03de; /* primary */
}

input[type="range"] {
    accent-color: #ad03de;
}

/* ── PRICE RANGE SLIDER ──────────────────────────────────── */
.price-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #e9e0eb; /* surface-variant */
    border-radius: 9999px;
    outline: none;
    cursor: pointer;
}
.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ad03de;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(173, 3, 222, 0.3);
}

/* ── ANIMATIONS ──────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.4s ease both;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
.animate-spin {
    animation: spin 0.8s linear infinite;
}

/* ── FORM UTILITIES ──────────────────────────────────────── */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ── PAGINATION ──────────────────────────────────────────── */
.pagination-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    transition: all 0.2s ease;
    border: 1px solid #cec3d0; /* outline-variant */
    color: #4b454d;             /* on-surface-variant */
}
.pagination-btn:hover,
.pagination-btn.active {
    background-color: #ad03de;
    border-color: #ad03de;
    color: #ffffff;
}

/* ── TOAST NOTIFICATION ──────────────────────────────────── */
#toast-container {
    position: fixed;
    bottom: 5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    background: #322f37;
    color: #f5eff7;
    padding: 0.875rem 1.25rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    animation: fadeInUp 0.3s ease both;
    max-width: 320px;
}
.toast.success { border-left: 4px solid #4ade80; }
.toast.error   { border-left: 4px solid #ba1a1a; }
