/* ================================================================
   E-GIFTER.SHOP — Premium E-Commerce UI
   Dark/Light theme with system detection (prefers-color-scheme)
   ================================================================ */

/* Font loaded via <link> in header.php with display=swap for performance */

/* ----------------------------------------------------------------
   CSS Variables — Dark Theme (Default)
   ---------------------------------------------------------------- */
:root {
    --color-bg: #0f1117;
    --color-bg-secondary: #161922;
    --color-bg-card: #1c1f2e;
    --color-bg-card-hover: #242838;
    --color-surface: #1a1d2b;
    --color-text: #f1f2f6;
    --color-text-secondary: #9ca3b4;
    --color-text-muted: #636b80;
    --color-accent: #ffc107;
    --color-accent-hover: #ffca2c;
    --color-accent2: #6c63ff;
    --color-success: #10b981;
    --color-success-soft: rgba(16, 185, 129, 0.12);
    --color-warning: #f59e0b;
    --color-warning-soft: rgba(245, 158, 11, 0.12);
    --color-danger: #ef4444;
    --color-danger-soft: rgba(239, 68, 68, 0.12);
    --color-border: rgba(255, 255, 255, 0.06);
    --color-border-light: rgba(255, 255, 255, 0.1);
    --color-input-bg: #0f1117;
    --color-navbar-bg: #161922;
    --color-footer-bg: #161922;
    --color-hero-gradient: linear-gradient(135deg, #1a1d2e 0%, #2d1b4e 50%, #1a2d4e 100%);
    --color-info-bar-bg: #161922;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow-accent: 0 0 30px rgba(255, 193, 7, 0.2);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ----------------------------------------------------------------
   Light Theme
   ---------------------------------------------------------------- */
@media (prefers-color-scheme: light) {
    :root {
        --color-bg: #f5f7fa;
        --color-bg-secondary: #ffffff;
        --color-bg-card: #ffffff;
        --color-bg-card-hover: #f0f2f5;
        --color-surface: #ffffff;
        --color-text: #1a1d2b;
        --color-text-secondary: #5a6178;
        --color-text-muted: #8b93a7;
        --color-accent: #6c63ff;
        --color-accent-hover: #5a52e0;
        --color-accent2: #6c63ff;
        --color-success: #059669;
        --color-success-soft: rgba(5, 150, 105, 0.1);
        --color-warning: #d97706;
        --color-warning-soft: rgba(217, 119, 6, 0.1);
        --color-danger: #dc2626;
        --color-danger-soft: rgba(220, 38, 38, 0.1);
        --color-border: rgba(0, 0, 0, 0.08);
        --color-border-light: rgba(0, 0, 0, 0.12);
        --color-input-bg: #f5f7fa;
        --color-navbar-bg: #ffffff;
        --color-footer-bg: #ffffff;
        --color-hero-gradient: linear-gradient(135deg, #ede9fe 0%, #e0e7ff 50%, #dbeafe 100%);
        --color-info-bar-bg: #ffffff;
        --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.08);
        --shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
        --shadow-glow-accent: 0 0 20px rgba(108, 99, 255, 0.15);
    }
}

/* ----------------------------------------------------------------
   Reset & Base
   ---------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    direction: rtl;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

/* ----------------------------------------------------------------
   Navbar
   ---------------------------------------------------------------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-navbar-bg);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    height: 68px;
    flex-wrap: wrap;
    gap: 10px;
}

.navbar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 900;
    color: var(--color-accent);
}

.navbar .brand img {
    height: 42px;
    width: auto;
    border-radius: 8px;
}

.navbar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.navbar nav a {
    color: var(--color-text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.navbar nav a:hover {
    color: var(--color-accent);
    background: rgba(108, 99, 255, 0.08);
}

/* ----------------------------------------------------------------
   Hero Slider
   ---------------------------------------------------------------- */
.hero-slider {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
}

.hero-slider .slides {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slider .slide {
    min-width: 100%;
    position: relative;
}

.hero-slider .slide img {
    width: 100%;
    height: auto;
    max-height: 800px;
    object-fit: cover;
    display: block;
}

.hero-slider .slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.hero-slider .slider-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s;
}

.hero-slider .slider-dots .dot.active {
    background: var(--color-accent);
    transform: scale(1.3);
}

.hero-slider .slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.4);
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}

.hero-slider .slider-arrow:hover {
    background: rgba(0,0,0,0.7);
}

.hero-slider .slider-arrow.prev { right: 16px; }
.hero-slider .slider-arrow.next { left: 16px; }

/* ----------------------------------------------------------------
   Info Bar
   ---------------------------------------------------------------- */
.info-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0;
    background: var(--color-info-bar-bg);
    border-bottom: 1px solid var(--color-border);
}

.info-bar-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 28px;
    border-left: 1px solid var(--color-border);
}

.info-bar-item:last-child { border-left: none; }

.info-bar-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(108, 99, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
}

.info-bar-text h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 2px;
}

.info-bar-text p {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* ----------------------------------------------------------------
   Container
   ---------------------------------------------------------------- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 32px;
}

/* ----------------------------------------------------------------
   Section Title
   ---------------------------------------------------------------- */
h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--color-text);
}

.section-subtitle {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: 28px;
}

/* ----------------------------------------------------------------
   Search Box
   ---------------------------------------------------------------- */
.search-box {
    margin-bottom: 28px;
    position: relative;
    max-width: 500px;
}

.search-box input {
    width: 100%;
    padding: 14px 18px 14px 44px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: var(--font-main);
    color: var(--color-text);
    outline: none;
    transition: all var(--transition-fast);
}

.search-box input::placeholder {
    color: var(--color-text-muted);
}

.search-box input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    pointer-events: none;
}

/* ----------------------------------------------------------------
   Grid
   ---------------------------------------------------------------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.cat-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

/* Account grid: 3 or 4 columns on desktop */
.account-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 24px;
}

.account-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ----------------------------------------------------------------
   Cards
   ---------------------------------------------------------------- */
.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

a.card:hover, .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--color-border-light);
}

.card h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
}

.card .price {
    color: var(--color-accent);
    font-weight: 800;
    margin: 12px 0;
    font-size: 18px;
}

/* Category card */
.cat-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
    padding: 0;
    overflow: hidden;
    min-height: 200px;
}

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

.cat-card .cat-card-img img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
    transition: transform var(--transition-smooth);
}

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

.cat-card-fallback {
    font-size: 48px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.cat-card .cat-card-title {
    padding: 18px 22px;
    font-size: 17px;
    font-weight: 700;
    color: var(--color-text);
    width: 100%;
}

/* Product card */
.product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px;
}

.product-card .cat-card-img {
    width: 90px;
    height: 90px;
    margin: 0 auto 16px;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card .cat-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card .cat-card-fallback {
    font-size: 32px;
}

.product-card .cat-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

/* ----------------------------------------------------------------
   Category Card Color Palette (auto-assigned by nth-child)
   ---------------------------------------------------------------- */
.cat-grid .card:nth-child(6n+1) .cat-card-img { background: linear-gradient(135deg, #e91e63, #9c27b0); }
.cat-grid .card:nth-child(6n+2) .cat-card-img { background: linear-gradient(135deg, #1565c0, #42a5f5); }
.cat-grid .card:nth-child(6n+3) .cat-card-img { background: linear-gradient(135deg, #1b2838, #2a475e); }
.cat-grid .card:nth-child(6n+4) .cat-card-img { background: linear-gradient(135deg, #107c10, #2ecc71); }
.cat-grid .card:nth-child(6n+5) .cat-card-img { background: linear-gradient(135deg, #4285f4, #34a853); }
.cat-grid .card:nth-child(6n+6) .cat-card-img { background: linear-gradient(135deg, #e60012, #ff6b6b); }

/* Product grid colors */
.grid:not(.cat-grid):not(.account-grid) .card:nth-child(6n+1) .cat-card-img { background: linear-gradient(135deg, #e91e63, #9c27b0); }
.grid:not(.cat-grid):not(.account-grid) .card:nth-child(6n+2) .cat-card-img { background: linear-gradient(135deg, #1565c0, #42a5f5); }
.grid:not(.cat-grid):not(.account-grid) .card:nth-child(6n+3) .cat-card-img { background: linear-gradient(135deg, #1b2838, #2a475e); }
.grid:not(.cat-grid):not(.account-grid) .card:nth-child(6n+4) .cat-card-img { background: linear-gradient(135deg, #107c10, #2ecc71); }
.grid:not(.cat-grid):not(.account-grid) .card:nth-child(6n+5) .cat-card-img { background: linear-gradient(135deg, #4285f4, #34a853); }
.grid:not(.cat-grid):not(.account-grid) .card:nth-child(6n+6) .cat-card-img { background: linear-gradient(135deg, #e60012, #ff6b6b); }

/* ----------------------------------------------------------------
   Buttons
   ---------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all var(--transition-fast);
    gap: 8px;
}

.btn:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-accent);
}

.btn:active { transform: translateY(0); }

.btn.secondary {
    background: var(--color-bg-card);
    color: var(--color-text);
    border: 1px solid var(--color-border-light);
}

.btn.secondary:hover {
    background: var(--color-bg-card-hover);
    border-color: var(--color-accent);
    color: var(--color-accent);
    box-shadow: none;
}

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

.btn:disabled {
    background: var(--color-text-muted);
    color: #333;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-secondary);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.btn-back:hover {
    color: var(--color-accent);
    background: rgba(108, 99, 255, 0.08);
}

/* ----------------------------------------------------------------
   Form Elements
   ---------------------------------------------------------------- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    background: var(--color-input-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font-main);
    color: var(--color-text);
    direction: ltr;
    text-align: center;
    transition: all var(--transition-fast);
    outline: none;
}

.form-group input::placeholder { color: var(--color-text-muted); }

.form-group input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

/* ----------------------------------------------------------------
   Auth Box
   ---------------------------------------------------------------- */
.auth-box {
    max-width: 440px;
    margin: 60px auto;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 44px 36px;
    text-align: center;
}

.auth-box h2 { margin-bottom: 12px; }

/* ----------------------------------------------------------------
   Alerts
   ---------------------------------------------------------------- */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    animation: slideDown 0.3s ease-out;
}

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

.alert.error { background: var(--color-danger-soft); color: #ef4444; border-color: rgba(239, 68, 68, 0.2); }
.alert.success { background: var(--color-success-soft); color: #10b981; border-color: rgba(16, 185, 129, 0.2); }
.alert.info { background: rgba(108, 99, 255, 0.1); color: #6c63ff; border-color: rgba(108, 99, 255, 0.2); }

/* ----------------------------------------------------------------
   Tables
   ---------------------------------------------------------------- */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

table th, table td {
    padding: 14px 16px;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
}

table th {
    background: rgba(108, 99, 255, 0.04);
    font-weight: 700;
    color: var(--color-text-secondary);
    font-size: 13px;
}

table tr:last-child td { border-bottom: none; }
table tr:hover td { background: rgba(108, 99, 255, 0.02); }

.table-scroll {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-lg);
}

.table-scroll table { min-width: 560px; }

/* ----------------------------------------------------------------
   Badges
   ---------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge.ok { background: var(--color-success-soft); color: var(--color-success); }
.badge.wait { background: var(--color-warning-soft); color: var(--color-warning); }
.badge.bad { background: var(--color-danger-soft); color: var(--color-danger); }

/* ----------------------------------------------------------------
   Steps
   ---------------------------------------------------------------- */
.steps {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
}

.steps .step {
    flex: 1;
    padding: 12px 8px;
    text-align: center;
    border-radius: var(--radius-sm);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: all var(--transition-smooth);
}

.steps .step.done { background: var(--color-success-soft); color: var(--color-success); border-color: rgba(16, 185, 129, 0.3); }
.steps .step.active { background: var(--color-accent); color: #fff; font-weight: 700; border-color: transparent; box-shadow: var(--shadow-glow-accent); }

/* ----------------------------------------------------------------
   Footer
   ---------------------------------------------------------------- */
.footer {
    text-align: center;
    padding: 40px 24px;
    color: var(--color-text-muted);
    font-size: 13px;
    border-top: 1px solid var(--color-border);
    background: var(--color-footer-bg);
}

/* ----------------------------------------------------------------
   Pagination
   ---------------------------------------------------------------- */
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
}

.pagination a, .pagination span {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.pagination a:hover { border-color: var(--color-accent); color: var(--color-accent); }
.pagination .active { background: var(--color-accent); color: #fff; border-color: transparent; font-weight: 700; }

/* ----------------------------------------------------------------
   Animations
   ---------------------------------------------------------------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.container { animation: fadeInUp 0.5s ease-out; }

.cat-grid .card:nth-child(1) { animation: fadeInUp 0.4s ease-out 0.05s both; }
.cat-grid .card:nth-child(2) { animation: fadeInUp 0.4s ease-out 0.1s both; }
.cat-grid .card:nth-child(3) { animation: fadeInUp 0.4s ease-out 0.15s both; }
.cat-grid .card:nth-child(4) { animation: fadeInUp 0.4s ease-out 0.2s both; }
.cat-grid .card:nth-child(5) { animation: fadeInUp 0.4s ease-out 0.25s both; }
.cat-grid .card:nth-child(6) { animation: fadeInUp 0.4s ease-out 0.3s both; }
.cat-grid .card:nth-child(7) { animation: fadeInUp 0.4s ease-out 0.35s both; }
.cat-grid .card:nth-child(8) { animation: fadeInUp 0.4s ease-out 0.4s both; }
.cat-grid .card:nth-child(9) { animation: fadeInUp 0.4s ease-out 0.45s both; }

/* ----------------------------------------------------------------
   Scrollbar
   ---------------------------------------------------------------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: rgba(108, 99, 255, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(108, 99, 255, 0.4); }
::selection { background: var(--color-accent); color: #fff; }
/* ----------------------------------------------------------------


   Responsive — Laptop
   ---------------------------------------------------------------- */
@media (max-width: 1280px) {
        .hero-slider .slide img {max-height: 500px;}
    }

/* ----------------------------------------------------------------


   Responsive — Tablet
   ---------------------------------------------------------------- */
@media (max-width: 1024px) {
    .cat-grid { grid-template-columns: repeat(3, 1fr); }
    .account-grid { grid-template-columns: repeat(2, 1fr); }
    .account-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
    }

@media (max-width: 900px) {
    .navbar { padding: 0 20px; height: auto; padding-top: 12px; padding-bottom: 12px; }
    .container { padding: 28px 18px; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
    .info-bar { grid-template-columns: 1fr; }
    .info-bar-item { border-left: none; border-bottom: 1px solid var(--color-border); }
    .info-bar-item:last-child { border-bottom: none; }
    h2 { font-size: 22px; }
}

/* ----------------------------------------------------------------
   Responsive — Mobile
   ---------------------------------------------------------------- */
@media (max-width: 640px) {
    .navbar {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        height: auto;
    }
    .navbar .brand { font-size: 17px; }
    .navbar .brand img { height: 34px; }
    .navbar nav { width: 100%; overflow-x: auto; gap: 2px; padding-bottom: 4px; }
    .navbar nav a { padding: 6px 12px; font-size: 13px; }

    .hero-slider .slide img { max-height: 200px; }

    .container { padding: 20px 14px; }
    h2 { font-size: 20px; }

    .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .account-grid, .account-grid.cols-4 { grid-template-columns: 1fr; }

    .cat-card { min-height: 160px; }
    .cat-card .cat-card-img { height: 120px; }
    .cat-card .cat-card-title { padding: 12px 14px; font-size: 14px; }

    .card { padding: 18px 14px; border-radius: var(--radius-md); }
    .auth-box { margin: 24px auto; max-width: 100%; padding: 28px 18px; }

    table th, table td { padding: 10px 8px; font-size: 12.5px; }
    .steps { flex-direction: column; gap: 8px; }
    .btn { padding: 11px 20px; font-size: 13px; }
    .info-bar-item { padding: 14px 18px; }
    .search-box { max-width: 100%; }
}

/* ================================================================
   NEW UX FEATURES
   ================================================================ */

/* ----------------------------------------------------------------
   Toast Notifications
   ---------------------------------------------------------------- */
#toastContainer {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: 90%;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    pointer-events: all;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.toast-success .toast-icon { background: var(--color-success-soft); color: var(--color-success); }
.toast-error .toast-icon { background: var(--color-danger-soft); color: var(--color-danger); }
.toast-info .toast-icon { background: rgba(108, 99, 255, 0.1); color: #6c63ff; }
.toast-warning .toast-icon { background: var(--color-warning-soft); color: var(--color-warning); }

.toast-msg { flex: 1; }

.toast-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

/* ----------------------------------------------------------------
   Scroll to Top Button
   ---------------------------------------------------------------- */
#scrollToTop {
    position: fixed;
    bottom: 90px;
    left: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #fff;
    border: none;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 900;
    pointer-events: none;
}

#scrollToTop.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

#scrollToTop:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(108, 99, 255, 0.5);
}

/* ----------------------------------------------------------------
   Scroll Reveal Animation
   ---------------------------------------------------------------- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delay for grid items */
.cat-grid .reveal-on-scroll:nth-child(1) { transition-delay: 0.05s; }
.cat-grid .reveal-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.cat-grid .reveal-on-scroll:nth-child(3) { transition-delay: 0.15s; }
.cat-grid .reveal-on-scroll:nth-child(4) { transition-delay: 0.2s; }
.cat-grid .reveal-on-scroll:nth-child(5) { transition-delay: 0.25s; }
.cat-grid .reveal-on-scroll:nth-child(6) { transition-delay: 0.3s; }
.cat-grid .reveal-on-scroll:nth-child(7) { transition-delay: 0.35s; }
.cat-grid .reveal-on-scroll:nth-child(8) { transition-delay: 0.4s; }
.cat-grid .reveal-on-scroll:nth-child(9) { transition-delay: 0.45s; }

/* ----------------------------------------------------------------
   Telegram Floating Action Button
   ---------------------------------------------------------------- */
#telegramFab {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0088cc, #00aaff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 136, 204, 0.4);
    z-index: 900;
    transition: all 0.3s ease;
    animation: fabPulse 3s infinite;
}

#telegramFab svg {
    width: 26px;
    height: 26px;
}

#telegramFab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(0, 136, 204, 0.6);
}

@keyframes fabPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(0, 136, 204, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(0, 136, 204, 0.7); }
}

/* ----------------------------------------------------------------
   Animated Navbar Gradient
   ---------------------------------------------------------------- */
.navbar {
    background: var(--color-navbar-bg);
    background-size: 200% 200%;
    animation: navGradient 8s ease infinite;
}

@keyframes navGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Dark mode navbar gradient */
@media (prefers-color-scheme: dark) {
    .navbar {
        background: linear-gradient(135deg, #161922 0%, #1a1d2e 25%, #1e1b2e 50%, #161922 75%, #1a2030 100%);
        background-size: 200% 200%;
    }
}

@media (prefers-color-scheme: light) {
    .navbar {
        background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 25%, #f0f2ff 50%, #ffffff 75%, #f8faff 100%);
        background-size: 200% 200%;
    }
}

/* ----------------------------------------------------------------
   Stats Section
   ---------------------------------------------------------------- */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.stats-item {
    text-align: center;
    padding: 28px 16px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-smooth);
}

.stats-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--color-accent);
    margin-bottom: 6px;
    direction: ltr;
}

.stat-label {
    font-size: 14px;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* ----------------------------------------------------------------
   Purchase Guide Steps
   ---------------------------------------------------------------- */
.guide-section {
    margin: 40px 0;
}

.guide-section h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--color-text);
}

.guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.guide-step {
    text-align: center;
    padding: 28px 20px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    position: relative;
    transition: all var(--transition-smooth);
}

.guide-step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--color-accent);
}

.guide-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.guide-step-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 6px;
}

.guide-step-desc {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ----------------------------------------------------------------
   Copy Button
   ---------------------------------------------------------------- */
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.2);
    color: var(--color-accent2);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-main);
}

.copy-btn:hover {
    background: rgba(108, 99, 255, 0.2);
    transform: scale(1.05);
}

.copy-btn.copied {
    background: var(--color-success-soft);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--color-success);
}

/* ----------------------------------------------------------------
   Pull to Refresh
   ---------------------------------------------------------------- */
#pullRefresh {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-60px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 9998;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    font-size: 13px;
    color: var(--color-text-secondary);
}

#pullRefresh.ready {
    color: var(--color-accent);
}

.pull-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ----------------------------------------------------------------
   Skeleton Loading
   ---------------------------------------------------------------- */
.skeleton {
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(108, 99, 255, 0.05), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.skeleton-loaded::after {
    animation: none;
    opacity: 0;
    transition: opacity 0.5s;
}

/* ----------------------------------------------------------------
   Responsive adjustments for new features
   ---------------------------------------------------------------- */
@media (max-width: 640px) {
    #scrollToTop { bottom: 80px; left: 16px; width: 40px; height: 40px; font-size: 16px; }
    #telegramFab { bottom: 16px; left: 16px; width: 48px; height: 48px; }
    #telegramFab svg { width: 22px; height: 22px; }
    .stats-section { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stats-item { padding: 20px 12px; }
    .stat-number { font-size: 28px; }
    .guide-steps { grid-template-columns: 1fr; }
    #toastContainer { top: 70px; width: 94%; }
}

/* ----------------------------------------------------------------
   FAQ Accordion
   ---------------------------------------------------------------- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-smooth);
}

.faq-item:hover {
    border-color: rgba(108, 99, 255, 0.3);
}

.faq-item.open {
    border-color: var(--color-accent);
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.1);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    text-align: right;
    transition: all var(--transition-fast);
}

.faq-question:hover {
    background: rgba(108, 99, 255, 0.03);
}

.faq-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(108, 99, 255, 0.1);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
    background: var(--color-accent);
    color: #fff;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
    padding: 0 24px;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 24px 20px;
}

.faq-answer p {
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
}

/* ----------------------------------------------------------------
   Terms & Conditions Page
   ---------------------------------------------------------------- */
.terms-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.terms-section {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    transition: all var(--transition-smooth);
}

.terms-section:hover {
    border-color: rgba(108, 99, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

.terms-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-accent2);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

.terms-section p {
    font-size: 14px;
    line-height: 1.9;
    color: var(--color-text-secondary);
    margin-bottom: 10px;
}

.terms-section p:last-child {
    margin-bottom: 0;
}

.terms-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.terms-section ul li {
    position: relative;
    padding-right: 20px;
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--color-text-secondary);
}

.terms-section ul li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    opacity: 0.6;
}

.terms-section strong {
    color: var(--color-text);
}

/* Responsive for FAQ & Terms */
@media (max-width: 640px) {
    .faq-question { padding: 14px 16px; font-size: 14px; }
    .faq-answer { padding: 0 16px; }
    .faq-item.open .faq-answer { padding: 0 16px 16px; }
    .terms-section { padding: 18px 16px; }
    .terms-section h3 { font-size: 15px; }
}

/* ------------------------------------------------------------------
   ناحیه‌ی کاربری — نسخه‌ی ارتقایافته (پروفایل، احراز هویت، کارت‌ها،
   سفارش‌ها). فقط ظاهریه، هیچ رفتار/منطقی رو تغییر نمی‌ده.
   ------------------------------------------------------------------ */

/* --- Profile Hero --- */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--color-hero-gradient);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.profile-avatar {
    width: 68px;
    height: 68px;
    min-width: 68px;
    border-radius: 50%;
    background: var(--color-bg-card);
    border: 2px solid var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 800;
    color: var(--color-accent);
}
.profile-info { flex: 1; min-width: 200px; }
.profile-info h2 { margin: 0 0 6px; font-size: 22px; }
.profile-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13.5px;
    color: var(--color-text-secondary);
}
.profile-meta span { display: flex; align-items: center; gap: 6px; }
.profile-meta svg { width: 15px; height: 15px; opacity: .8; }
.profile-badge-wrap { margin-inline-start: auto; }

/* --- Action Cards (grid of navigation cards with icons) --- */
.action-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.action-card-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: var(--radius-md);
    background: var(--color-success-soft);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
}
.action-card-icon svg { width: 22px; height: 22px; }
.action-card-body h3 { margin: 0 0 4px; }
.action-card-body p { margin: 0; font-size: 13px; color: var(--color-text-secondary); line-height: 1.7; }
.action-card-arrow { margin-inline-start: auto; align-self: center; color: var(--color-text-muted); font-size: 18px; opacity: 0; transition: opacity .2s, transform .2s; }
a.action-card:hover .action-card-arrow { opacity: 1; transform: translateX(-3px); }
[dir="rtl"] a.action-card:hover .action-card-arrow, a.action-card:hover .action-card-arrow { transform: translateX(3px); }
.action-card.disabled { opacity: .55; cursor: not-allowed; }

/* --- Verify progress (icon-based step indicator) --- */
.verify-progress { display: flex; align-items: center; gap: 0; margin-bottom: 28px; }
.verify-progress .vp-step { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; position: relative; }
.verify-progress .vp-circle {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--color-bg-card); border: 2px solid var(--color-border-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: var(--color-text-muted);
    transition: all .25s; z-index: 1;
}
.verify-progress .vp-step.done .vp-circle { background: var(--color-success); border-color: var(--color-success); color: #fff; }
.verify-progress .vp-step.active .vp-circle { background: var(--color-accent); border-color: var(--color-accent); color: #fff; box-shadow: var(--shadow-glow-accent); }
.verify-progress .vp-label { font-size: 12.5px; color: var(--color-text-secondary); text-align: center; }
.verify-progress .vp-step.active .vp-label, .verify-progress .vp-step.done .vp-label { color: var(--color-text); font-weight: 600; }
.verify-progress .vp-line { position: absolute; top: 19px; left: 50%; width: 100%; height: 2px; background: var(--color-border-light); z-index: 0; }
.verify-progress .vp-step:first-child .vp-line { display: none; }
.verify-progress .vp-step.done .vp-line, .verify-progress .vp-step.active .vp-line { background: var(--color-success); }

.verify-card-icon {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--color-success-soft); color: var(--color-accent);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.verify-card-icon svg { width: 28px; height: 28px; }

/* --- Bank cards visual --- */
.bank-card-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 24px; }
.bank-card-visual {
    border-radius: var(--radius-md);
    padding: 20px;
    background: linear-gradient(135deg, #2a2f45 0%, #1a1d2b 100%);
    color: #f1f2f6;
    position: relative;
    overflow: hidden;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--color-border-light);
}
.bank-card-visual::after {
    content: '';
    position: absolute;
    left: -30px; top: -30px;
    width: 140px; height: 140px;
    background: radial-gradient(circle, rgba(255,193,7,.18), transparent 70%);
}
.bank-card-visual .bc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.bank-card-visual .bc-chip { width: 34px; height: 24px; border-radius: 5px; background: linear-gradient(135deg, #ffe9a8, #ffc107); }
.bank-card-visual .bc-number { font-size: 18px; letter-spacing: 2px; direction: ltr; text-align: left; margin: 14px 0 6px; font-family: monospace; }
.bank-card-visual .bc-name { font-size: 12.5px; color: rgba(241,242,246,.7); }
.bank-card-add {
    border: 2px dashed var(--color-border-light);
    border-radius: var(--radius-md);
    min-height: 130px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    color: var(--color-text-secondary);
    background: transparent;
}

/* --- Orders list (card style rows, replaces raw table look) --- */
.order-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.order-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    transition: border-color .2s, transform .2s;
}
.order-row:hover { border-color: var(--color-border-light); transform: translateY(-2px); }
.order-row .or-id { font-size: 12.5px; color: var(--color-text-muted); font-family: monospace; }
.order-row .or-main { flex: 1; min-width: 0; }
.order-row .or-title { font-weight: 700; font-size: 14.5px; margin-bottom: 4px; }
.order-row .or-sub { font-size: 12.5px; color: var(--color-text-secondary); display: flex; gap: 10px; flex-wrap: wrap; }
.order-row .or-amount { font-weight: 800; color: var(--color-accent); font-size: 15px; white-space: nowrap; }
.order-row .or-action { white-space: nowrap; }

/* --- Order detail hero --- */
.order-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--color-hero-gradient);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 20px;
}
.order-hero .oh-id { font-size: 13px; color: var(--color-text-secondary); font-family: monospace; }
.order-hero .oh-title { font-size: 20px; font-weight: 800; margin: 4px 0 0; }
.order-hero .oh-amount { font-size: 22px; font-weight: 800; color: var(--color-accent); }

.delivery-box {
    background: var(--color-success-soft);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    padding: 18px;
}
.delivery-box .db-label { font-size: 12.5px; color: var(--color-success); font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.delivery-box pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: var(--font-main);
    font-size: 14px;
    margin: 0 0 12px;
    color: var(--color-text);
    line-height: 1.8;
}

/* --- Empty state --- */
.empty-state { text-align: center; padding: 48px 20px; color: var(--color-text-secondary); }
.empty-state svg { width: 44px; height: 44px; opacity: .35; margin-bottom: 14px; }
.empty-state p { margin: 0; font-size: 14px; }

/* --- Detail table refinement (used in order.php summary card) --- */
.detail-kv { display: flex; flex-direction: column; gap: 0; }
.detail-kv .dk-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--color-border); font-size: 14px; }
.detail-kv .dk-row:last-child { border-bottom: none; }
.detail-kv .dk-label { color: var(--color-text-secondary); }
.detail-kv .dk-value { font-weight: 600; color: var(--color-text); }

@media (max-width: 640px) {
    .profile-hero { padding: 20px; }
    .profile-avatar { width: 56px; height: 56px; min-width: 56px; font-size: 21px; }
    .profile-badge-wrap { margin-inline-start: 0; width: 100%; }
    .verify-progress .vp-label { font-size: 11px; }
    .order-row { flex-wrap: wrap; }
    .order-row .or-amount { order: 3; }
    .order-hero { padding: 18px; }
}

/* ------------------------------------------------------------------
   لیست محصولات زیر دسته — کارت مدرن (pc2). فقط ظاهریه.
   ------------------------------------------------------------------ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
}

.pc2 {
    display: flex;
    flex-direction: column;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
    position: relative;
}
.pc2:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--color-accent);
}

.pc2-media {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1b2838, #2a475e);
}
.pc2-media img {
    width: 78%;
    height: 78%;
    object-fit: contain;
    transition: transform var(--transition-smooth);
    filter: drop-shadow(0 6px 14px rgba(0,0,0,.35));
}
.pc2:hover .pc2-media img { transform: scale(1.07); }
.pc2-media.no-img img { display: none; }
.pc2-fallback { font-size: 46px; font-weight: 800; color: rgba(255,255,255,.9); }

.pc2-body {
    padding: 16px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}
.pc2-title {
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9em;
}

.pc2-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}
.pc2-price-wrap { display: flex; align-items: baseline; gap: 4px; }
.pc2-price { font-size: 17px; font-weight: 800; color: var(--color-accent); }
.pc2-currency { font-size: 11.5px; color: var(--color-text-secondary); }

.pc2-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text);
    background: var(--color-bg-card-hover);
    padding: 7px 13px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
}
.pc2-cta svg { width: 15px; height: 15px; }
.pc2:hover .pc2-cta { background: var(--color-accent); color: #fff; }

/* رنگ‌بندی خودکار پس‌زمینه‌ی عکس محصولات (وقتی عکس شفاف/ندارن) */
.product-grid .pc2:nth-child(6n+1) .pc2-media { background: linear-gradient(135deg, #e91e63, #9c27b0); }
.product-grid .pc2:nth-child(6n+2) .pc2-media { background: linear-gradient(135deg, #1565c0, #42a5f5); }
.product-grid .pc2:nth-child(6n+3) .pc2-media { background: linear-gradient(135deg, #1b2838, #2a475e); }
.product-grid .pc2:nth-child(6n+4) .pc2-media { background: linear-gradient(135deg, #107c10, #2ecc71); }
.product-grid .pc2:nth-child(6n+5) .pc2-media { background: linear-gradient(135deg, #4285f4, #34a853); }
.product-grid .pc2:nth-child(6n+6) .pc2-media { background: linear-gradient(135deg, #e60012, #ff6b6b); }

@media (max-width: 640px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .pc2-body { padding: 12px 12px 14px; gap: 10px; }
    .pc2-title { font-size: 13px; min-height: 2.8em; }
    .pc2-price { font-size: 15px; }
    .pc2-cta { padding: 6px 10px; font-size: 12px; }
    .pc2-footer { flex-direction: column; align-items: stretch; gap: 8px; }
    .pc2-cta { justify-content: center; }
}

/* ------------------------------------------------------------------
   صفحه‌ی محصول — چیدمان دوستونه‌ی مدرن (pp). فقط ظاهریه.
   ------------------------------------------------------------------ */
.product-page {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    padding: 32px;
    align-items: start;
}

/* ستون عکس */
.pp-media-col { position: sticky; top: 90px; }
.pp-media {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1b2838, #2a475e);
    position: relative;
}
.pp-media img {
    width: 74%;
    height: 74%;
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(0,0,0,.4));
}
.pp-media.no-img img { display: none; }
.pp-fallback { font-size: 72px; font-weight: 800; color: rgba(255,255,255,.9); }

/* ستون اطلاعات */
.pp-info-col { display: flex; flex-direction: column; }
.pp-cat {
    display: inline-block;
    align-self: flex-start;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-accent);
    background: var(--color-success-soft);
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
}
.pp-title { font-size: 24px; font-weight: 800; margin: 0 0 14px; line-height: 1.5; }
.pp-descr { color: var(--color-text-secondary); line-height: 2; font-size: 14px; margin: 0 0 22px; }

.pp-price-box {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}
.pp-price-label { font-size: 13px; color: var(--color-text-secondary); }
.pp-price { font-size: 26px; font-weight: 800; margin: 0; }

.pp-notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px 16px;
    background: var(--color-warning-soft);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 13px;
    line-height: 1.9;
    color: var(--color-warning);
    font-weight: 500;
}
.pp-notice svg { width: 20px; height: 20px; min-width: 20px; margin-top: 2px; }

.pp-cta { width: 100%; padding: 15px; font-size: 15px; font-weight: 700; }

@media (max-width: 720px) {
    .product-page {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 22px;
    }
    .pp-media-col { position: static; max-width: 240px; margin: 0 auto; width: 100%; }
    .pp-title { font-size: 20px; text-align: center; }
    .pp-cat { align-self: center; }
    .pp-info-col { text-align: center; }
    .pp-descr { text-align: right; }
    .pp-price-box { justify-content: center; gap: 8px; }
}
