/* Purple Theme - Listaria */
:root {
    /* Purple Color Palette */
    --primary-text: #1a1a1a;
    --secondary-text: #666666;
    --bg-color: #ffffff;
    --white: #ffffff;
    --brand-color: #6B21A8;
    /* Deep Purple */
    --brand-dark: #581c87;
    --brand-light: #a855f7;
    --accent-gradient: linear-gradient(135deg, #6B21A8 0%, #7c3aed 100%);
    --accent-gradient-dark: linear-gradient(135deg, #581c87 0%, #6B21A8 100%);
    --accent-black: #1a1a1a;
    --tag-new: #22c55e;
    --tag-like-new: #10b981;
    --tag-lightly-used: #f59e0b;
    --tag-regular: #6366f1;
    --destructive: #ef4444;

    /* Clean borders */
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;

    /* Border radius */
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-sm: 8px;
    --border-radius-pill: 50px;

    /* Font */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Smooth transitions */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--primary-text);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Selection Style */
::selection {
    background: rgba(107, 33, 168, 0.2);
    color: var(--primary-text);
}

/* ===== NAVBAR ===== */
.navbar {
    background: var(--white);
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}

.brand-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
    text-decoration: none;
}

.brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-text);
    letter-spacing: -0.5px;
}

.brand-location {
    font-size: 0.6rem;
    color: #888;
    margin-top: 2px;
}

/* Search Container */
.search-container {
    flex-grow: 1;
    max-width: 400px;
    margin: 0 2rem;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.6rem 1rem;
    padding-right: 2.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    font-size: 0.85rem;
    color: var(--primary-text);
    outline: none;
    transition: var(--transition);
    font-family: var(--font-family);
}

.search-input::placeholder {
    color: #999;
}

.search-input:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(98, 0, 234, 0.1);
}

.search-filter-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brand-color);
    cursor: pointer;
}

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--primary-text);
    font-weight: 500;
    font-size: 0.85rem;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--brand-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Buttons */
.btn-signin {
    padding: 0.5rem 1rem;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: transparent;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    color: var(--primary-text);
    transition: var(--transition);
    white-space: nowrap;
}

.btn-signin:hover {
    border-color: var(--brand-color);
    color: var(--brand-color);
}

.btn-sell {
    background: #1a1a1a;
    color: var(--white) !important;
    padding: 0 1.2rem;
    height: 36px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
    white-space: nowrap;
}

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

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.hamburger:hover {
    background: rgba(0, 0, 0, 0.05);
}

.hamburger ion-icon {
    font-size: 1.5rem;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2a2a2a 100%);
    color: var(--white);
    margin: 1rem 1.5rem;
    border-radius: var(--border-radius-lg);
    position: relative;
    overflow: hidden;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    width: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.75rem;
    color: #fff;
    letter-spacing: -1px;
}

.hero-subtitle {
    display: block;
    font-size: 0.85rem;
    color: var(--brand-color);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: none;
    padding: 0;
    border-radius: 0;
}

.play-button {
    display: none;
}

.play-icon {
    width: 0;
    height: 0;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 15px solid white;
    margin-left: 3px;
}

.hero-image-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    mask-image: linear-gradient(to right, transparent, black 20%);
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%);
}

/* ===== CATEGORIES ===== */
.categories-container {
    padding: 0 1.5rem;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.scroll-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--secondary-text);
    transition: var(--transition);
    flex-shrink: 0;
}

.scroll-btn:hover {
    border-color: var(--primary-text);
    color: var(--primary-text);
}

.categories-wrapper {
    flex-grow: 1;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0.25rem 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.categories-wrapper::-webkit-scrollbar {
    display: none;
}

.category-pill {
    display: inline-block;
    padding: 0.45rem 1rem;
    margin-right: 0.5rem;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--primary-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: var(--transition);
}

.category-pill:hover {
    border-color: var(--brand-color);
    color: var(--brand-color);
}

.category-pill.active {
    background: #1a1a1a;
    color: var(--white);
    border-color: #1a1a1a;
}

/* ===== PRODUCT GRID ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

.section-header {
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-text);
    margin-bottom: 0.25rem;
}

.product-count {
    color: var(--secondary-text);
    font-size: 0.85rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Default 4 on large screens */
    gap: 1.5rem;
    width: 100%;
}

/* ===== PRODUCT CARD ===== */
.card-wrapper {
    height: 100%;
    min-width: 0;
    /* Prevent grid blowout */
}

.product-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    border: 1px solid var(--border-color);
}

.product-card:hover {
    border-color: var(--brand-light);
    box-shadow: 0 8px 24px rgba(107, 33, 168, 0.1);
    transform: translateY(-4px);
}

.product-image-container {
    position: relative;
    width: 100%;
    height: 280px;
    /* Fixed height for alignment */
    background-color: #f8f8f8;
    overflow: hidden;
}

@media (max-width: 768px) {
    .product-image-container {
        height: 180px;
        /* Smaller fixed height for mobile */
    }
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Condition Badges */
.condition-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: capitalize;
    z-index: 10;
}

.condition-new,
.condition-badge.brand-new {
    background: #dcfce7;
    color: #166534;
}

.condition-like-new,
.condition-badge.like-new {
    background: #d1fae5;
    color: #065f46;
}

.condition-light,
.condition-lightly-used,
.condition-badge.lightly-used {
    background: #fef3c7;
    color: #92400e;
}

.condition-regular,
.condition-regularly-used,
.condition-badge.regularly-used {
    background: #fce7f3;
    color: #9d174d;
}

/* SOLD Badge */
.sold-badge,
.condition-badge.sold {
    background: var(--destructive);
    color: white;
}

.product-info {
    padding: 1rem;
    background: white;
}

.product-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: var(--primary-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-brand {
    font-size: 0.8rem;
    color: var(--secondary-text);
    margin-bottom: 0.35rem;
}

.product-price {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-text);
}

/* ===== FORMS - iOS Style ===== */
.sell-container {
    max-width: 560px;
    margin: 2rem auto;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-text);
}

.form-input,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
    color: var(--primary-text);
}

.form-input:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: var(--brand-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.15);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.drop-zone {
    border: 2px dashed rgba(107, 33, 168, 0.3);
    border-radius: var(--border-radius-sm);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(107, 33, 168, 0.02);
}

.drop-zone:hover,
.drop-zone.dragover {
    background: rgba(107, 33, 168, 0.05);
    border-color: var(--brand-color);
}

/* Primary Submit Button */
.submit-btn,
.btn-primary,
button[type="submit"] {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--brand-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
    box-shadow: 0 4px 14px rgba(107, 33, 168, 0.3);
}

.submit-btn:hover,
.btn-primary:hover,
button[type="submit"]:hover {
    background: var(--brand-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 33, 168, 0.4);
}

.submit-btn:active,
.btn-primary:active,
button[type="submit"]:active {
    transform: translateY(0);
}

/* Secondary Button */
.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-text);
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--spring);
    font-family: var(--font-family);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* ===== 3D PAYMENT CARD ===== */
.payment-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    perspective: 1500px;
}

.credit-card {
    width: 380px;
    height: 240px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.credit-card.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    background: linear-gradient(135deg, #1d1d1f 0%, #3a3a3c 100%);
    color: #fff;
}

.card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #2c2c2e 0%, #1d1d1f 100%);
}

.chip {
    width: 48px;
    height: 34px;
    background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
    border-radius: 6px;
    margin-bottom: 20px;
}

.card-number {
    font-size: 1.3rem;
    letter-spacing: 3px;
    font-family: 'SF Mono', 'Monaco', monospace;
}

.card-holder {
    font-size: 0.85rem;
    text-transform: uppercase;
    opacity: 0.7;
    letter-spacing: 1px;
}

.black-strip {
    background: #000;
    height: 45px;
    width: 100%;
    position: absolute;
    top: 30px;
    left: 0;
}

.cvv-box {
    background: #fff;
    color: #000;
    height: 38px;
    width: 90%;
    margin-top: 75px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 15px;
    font-family: 'SF Mono', monospace;
    font-weight: 600;
}

.payment-form {
    max-width: 380px;
    margin: 2rem auto;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--white);
    padding: 3rem 2rem 1.5rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h4 {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--secondary-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.footer-section a {
    display: block;
    color: var(--primary-text);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--brand-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--secondary-text);
    font-size: 0.85rem;
}

/* ===== MOBILE MENU DRAWER ===== */
.mobile-menu-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    z-index: 2000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.5rem;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    border-left: 1px solid var(--border-color);
}

.mobile-menu-drawer.active {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.close-btn {
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.drawer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-link {
    display: block;
    padding: 0.9rem 1rem;
    color: var(--primary-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.mobile-link:hover {
    background: #f5f5f5;
    color: var(--brand-color);
}

/* ===== PROFILE & DASHBOARD CARDS ===== */
.profile-container,
.dashboard-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--brand-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(107, 33, 168, 0.3);
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--secondary-text);
    margin-top: 0.25rem;
}

/* ===== ADMIN DASHBOARD ===== */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--white);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    background: var(--bg-color);
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--primary-text);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.25rem;
    transition: var(--transition);
    font-weight: 500;
}

.admin-nav-item:hover,
.admin-nav-item.active {
    background: rgba(107, 33, 168, 0.1);
    color: var(--brand-color);
}

/* ===== ALERTS & TOASTS ===== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: rgba(52, 199, 89, 0.1);
    color: #1d7a3a;
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.alert-error {
    background: rgba(255, 59, 48, 0.1);
    color: #c41e16;
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.alert-info {
    background: rgba(107, 33, 168, 0.08);
    color: var(--brand-dark);
    border: 1px solid rgba(107, 33, 168, 0.2);
}

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

th {
    background: rgba(0, 0, 0, 0.02);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--secondary-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:hover {
    background: #fafafa;
}

/* ===== LOADING ANIMATION ===== */
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(107, 33, 168, 0.2);
    border-radius: 50%;
    border-top-color: var(--brand-color);
    animation: spin 0.8s linear infinite;
}

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

/* ===== SKELETON LOADING ===== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ===== BLOG CARDS ===== */
.blog-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--spring);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

.blog-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.blog-card-content {
    padding: 1.25rem;
}

.blog-card-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-text);
    line-height: 1.4;
}

.blog-card-excerpt {
    color: var(--secondary-text);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
    }

    .search-container {
        display: none;
    }

    .nav-links {
        display: none;
    }

    .nav-actions {
        gap: 0.5rem;
    }

    .btn-signin {
        font-size: 0.8rem;
        padding: 0 0.8rem;
        height: 34px;
    }

    .btn-sell {
        font-size: 0.8rem;
        padding: 0 1rem;
        height: 34px;
    }

    .hamburger {
        display: block;
        padding: 4px;
    }

    .hero {
        height: 200px;
        margin: 0.75rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.75rem;
        letter-spacing: 2px;
    }

    .hero-content {
        padding: 1.5rem;
    }

    .categories-container {
        padding: 0 1rem;
    }

    .container {
        padding: 0 1rem 2rem;
    }

    /* Force 2 columns on mobile/tablet portrait */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }

    .product-info {
        padding: 0.75rem;
    }

    .product-title {
        font-size: 0.85rem;
    }

    .product-price {
        font-size: 0.9rem;
    }

    .admin-sidebar {
        display: none;
    }

    .admin-content {
        margin-left: 0;
    }

    .profile-link {
        display: none;
    }
}

@media (max-width: 600px) {
    .brand {
        font-size: 1.4rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .category-pill {
        padding: 0.45rem 0.9rem;
        font-size: 0.8rem;
    }

    .sell-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    /* Force 2 columns on small mobile */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
        /* Smaller gap for small screens */
    }

    .container {
        padding: 0 10px 2rem;
        /* Reduce side padding to give more space to grid */
    }

    /* Ensure images don't overflow */
    .product-card {
        width: 100%;
        min-width: 0;
    }

    .card-wrapper {
        min-width: 0;
    }

    .product-card {
        min-width: 0;
        /* Prevent grid blowout */
    }

    .product-image-container {
        height: 160px;
        /* Adjusted height for 2-col layout */
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}

.hidden {
    display: none;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.w-full {
    width: 100%;
}

.rounded {
    border-radius: var(--border-radius);
}

.shadow {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.bg-white {
    background: var(--white);
}

/* ===== SOLD OVERLAY ===== */
.sold-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.sold-badge {
    background: var(--destructive);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== IMAGE PREVIEW ===== */
.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.image-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.06);
}

/* ===== MODAL ===== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(20px);
    transition: var(--spring);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

.modal-backdrop.active .modal-content {
    transform: scale(1) translateY(0);
}

/* ===== TRANSITIONS FOR PAGE ELEMENTS ===== */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation for grid items */
.product-card:nth-child(1) {
    animation-delay: 0.05s;
}

.product-card:nth-child(2) {
    animation-delay: 0.1s;
}

.product-card:nth-child(3) {
    animation-delay: 0.15s;
}

.product-card:nth-child(4) {
    animation-delay: 0.2s;
}

.product-card:nth-child(5) {
    animation-delay: 0.25s;
}

.product-card:nth-child(6) {
    animation-delay: 0.3s;
}

.product-card:nth-child(7) {
    animation-delay: 0.35s;
}

.product-card:nth-child(8) {
    animation-delay: 0.4s;
}