/* ==========================================================================
   UseAgain — Theme: Green & Blue (OLX / Facebook Marketplace inspired)
   ========================================================================== */
:root {
  --green: #16A34A;
  --green-dark: #128040;
  --green-light: #E7F7EE;
  --blue: #2563EB;
  --blue-dark: #1D4ED8;
  --blue-light: #EAF1FE;
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #EEF2F0;
  --gray-300: #C9D2CD;
  --gray-500: #64748B;
  --gray-700: #334155;
  --gray-900: #0F172A;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 10px 28px rgba(15, 23, 42, 0.14);
  --font: 'Poppins', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --canvas: #F8FAFC;
  --header-dark: #0B3D24;
  --header-dark-2: #123A5C;
  --card-border: #E2E8F0;
}

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

body { font-family: var(--font); color: var(--gray-900); background: var(--canvas); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }
h2.section-title { font-size: 2rem; text-align: center; margin-bottom: 8px; }
p.section-sub { text-align: center; color: var(--gray-500); max-width: 620px; margin: 0 auto 40px; }
section { padding: 60px 0; background: var(--white); }
section.alt-bg { background: var(--canvas); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; border: 2px solid transparent; cursor: pointer; transition: all .2s ease; }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-2px); }
.btn-outline { background: transparent; border-color: var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: var(--white); }
.btn-whatsapp { background: #25D366; color: var(--white); }
.btn-whatsapp:hover { background: #1DA851; transform: translateY(-2px); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ---------- Header / Navbar ---------- */
.site-header { position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,0.12); }
.navbar-top { background: linear-gradient(100deg, var(--header-dark) 0%, var(--header-dark-2) 100%); padding: 14px 0; position: relative; }
.navbar { display: flex; align-items: center; gap: 24px; height: 44px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 1.35rem; font-weight: 800; flex-shrink: 0; }
.logo-mark { font-size: 1.5rem; }
.logo-accent { color: #7FD99A; }
.logo-text { color: var(--white); }

.navbar-search { flex: 1; max-width: 480px; display: flex; }
.navbar-search input { flex: 1; border: none; padding: 11px 16px; border-radius: 6px 0 0 6px; font-size: 0.92rem; outline: none; }
.navbar-search button { background: var(--green); border: none; padding: 0 18px; border-radius: 0 6px 6px 0; cursor: pointer; font-size: 1rem; }
.navbar-search button:hover { background: var(--green-dark); }

.nav-links { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.nav-links a { font-weight: 600; color: rgba(255,255,255,0.88); font-size: 0.9rem; }
.nav-links a:hover, .nav-links a.active { color: #FFFFFF; }
.btn-post-nav { background: var(--green); color: var(--white) !important; padding: 10px 18px; border-radius: 6px; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,0.18); }
.btn-post-nav:hover { background: var(--green-dark); }
.btn-post-nav.active { background: var(--green-dark); box-shadow: 0 0 0 2px rgba(255,255,255,0.4) inset; }
.nav-cta-group { display: flex; align-items: center; gap: 8px; }
.btn-post-nav-outline {
  background: transparent; color: var(--green) !important; border: 2px solid var(--green);
  box-shadow: none; padding: 8px 16px;
}
.btn-post-nav-outline:hover { background: var(--green-light); }
.btn-post-nav-outline.active { background: var(--green); color: #fff !important; }

/* ---------- Horizontal category bar (below header) ---------- */
.category-bar { background: var(--white); border-bottom: 1px solid var(--card-border); }
.category-bar-row {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 6px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 10px 0;
  scrollbar-width: thin;
}
.category-bar-row::-webkit-scrollbar { height: 4px; }
.category-bar-row::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 4px; }
.category-bar-item {
  display: flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0;
  padding: 8px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 600;
  color: var(--gray-700) !important; border: 1px solid transparent;
}
.category-bar-item:hover { background: var(--green-light); color: var(--green-dark) !important; }
.category-bar-item.active { background: var(--green); color: #fff !important; }
.category-bar-icon { font-size: 1rem; line-height: 1; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; margin-left: auto; }
.nav-toggle span { width: 24px; height: 3px; background: var(--white); border-radius: 2px; }

/* ---------- Categories & account dropdowns (nav) ---------- */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-weight: 600; font-size: 0.9rem; color: rgba(255,255,255,0.88);
  display: flex; align-items: center; gap: 6px; padding: 0;
}
.nav-dropdown-trigger:hover { color: #fff; }
.nav-dropdown-trigger .caret { font-size: 0.7rem; }
.account-avatar {
  width: 24px; height: 24px; border-radius: 50%; background: var(--green);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700;
}
.nav-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 14px); left: 0;
  background: var(--white); border-radius: 10px; box-shadow: var(--shadow-lg);
  min-width: 220px; max-height: 420px; overflow-y: auto; padding: 8px; z-index: 200;
}
.nav-dropdown-menu.nav-dropdown-menu-right { left: auto; right: 0; min-width: 180px; }
.nav-dropdown-menu.open { display: block; }
.nav-dropdown-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  font-size: 0.9rem; font-weight: 600; color: var(--gray-700) !important; white-space: nowrap;
}
.nav-dropdown-item:hover, .nav-dropdown-item.active { background: var(--green-light); color: var(--green-dark) !important; }
.nav-dropdown-item .cat-icon { font-size: 1rem; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(120deg, var(--green-light) 0%, var(--blue-light) 100%); padding: 70px 0; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; width: 260px; height: 260px; background: var(--green); opacity: 0.07; border-radius: 50%; top: -80px; right: -60px; }
.hero::after { content: ''; position: absolute; width: 200px; height: 200px; background: var(--blue); opacity: 0.08; border-radius: 50%; bottom: -60px; left: 8%; }
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 2.5rem; margin-bottom: 16px; }
.hero h1 span { color: var(--green); }
.hero p.lead { font-size: 1.08rem; color: var(--gray-700); margin-bottom: 24px; max-width: 520px; }
.hero-search { display: flex; max-width: 520px; margin-bottom: 24px; box-shadow: var(--shadow-lg); border-radius: 10px; overflow: hidden; }
.hero-search input { flex: 1; border: none; padding: 16px 18px; font-size: 1rem; outline: none; }
.hero-search button { background: var(--green); color: #fff; border: none; padding: 0 26px; font-weight: 700; cursor: pointer; }
.hero-search button:hover { background: var(--green-dark); }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; margin-top: 34px; }
.hero-stats div strong { display: block; font-size: 1.6rem; color: var(--blue-dark); }
.hero-stats div span { color: var(--gray-500); font-size: 0.88rem; }
.hero-visual { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 16px; }
.hero-visual img { border-radius: 10px; }

/* ---------- Category Grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 30px; }
.cat-card { background: var(--white); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 26px 14px; text-align: center; transition: all .2s ease; box-shadow: var(--shadow); }
.cat-card:hover { transform: translateY(-6px); border-color: var(--cat-color, var(--green)); box-shadow: var(--shadow-lg); }
.cat-card .cat-icon { font-size: 1.8rem; margin: 0 auto 12px; width: 62px; height: 62px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.cat-card h4 { font-size: 0.95rem; color: var(--gray-900); }
.cat-card span { font-size: 0.8rem; color: var(--gray-500); }

/* ---------- Product Grid / Cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 30px; }
.product-card { background: var(--white); border: 1px solid var(--card-border); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--green); }
.product-card .thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--gray-100); }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .thumb img { transform: scale(1.06); }
.badge { position: absolute; top: 10px; left: 10px; padding: 4px 12px; border-radius: 5px; font-size: 0.7rem; font-weight: 700; color: var(--white); text-transform: uppercase; letter-spacing: 0.03em; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.badge-sell { background: var(--blue-dark); }
.badge-donate { background: var(--green-dark); }
.badge-condition { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,0.95); color: var(--gray-900); padding: 4px 10px; border-radius: 5px; font-size: 0.7rem; font-weight: 700; }
.product-info { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.product-info h3 { font-size: 0.98rem; margin-bottom: 5px; line-height: 1.35; }
.product-info h3 a:hover { color: var(--blue); }
.product-info .cat-tag { font-size: 0.75rem; font-weight: 700; margin-bottom: 6px; color: var(--blue); }
.product-info .price { font-size: 1.15rem; font-weight: 800; color: var(--gray-900); margin-bottom: 6px; }
.product-info .price.donate { color: var(--green-dark); font-size: 0.95rem; }
.product-info .location { font-size: 0.8rem; color: var(--gray-500); margin-bottom: 12px; }
.product-info .btn { margin-top: auto; }
.no-results { text-align: center; padding: 60px 20px; color: var(--gray-500); }

/* ---------- How It Works ---------- */
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 30px; }
.how-step { text-align: center; padding: 20px; }
.how-step .num { width: 54px; height: 54px; border-radius: 50%; background: var(--blue); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; margin: 0 auto 16px; }
.how-step h4 { margin-bottom: 8px; }
.how-step p { font-size: 0.9rem; color: var(--gray-500); }

/* ---------- Testimonials ---------- */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 30px; }
.testimonial-card { background: var(--white); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.testimonial-card .stars { color: #F59E0B; margin-bottom: 10px; font-size: 0.9rem; }
.testimonial-card p.quote { font-style: italic; color: var(--gray-700); margin-bottom: 18px; }
.testimonial-person { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--green-light); color: var(--green-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.testimonial-person strong { display: block; font-size: 0.92rem; }
.testimonial-person span { font-size: 0.8rem; color: var(--gray-500); }

/* ---------- Statistics Band ---------- */
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; background: var(--white); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 34px 20px; box-shadow: var(--shadow); }
.stat-item { text-align: center; }
.stat-icon { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin: 0 auto 12px; }
.stat-item strong { display: block; font-size: 1.8rem; font-weight: 800; color: var(--gray-900); }
.stat-item span { color: var(--gray-500); font-size: 0.88rem; }

/* ---------- Donate Banner ---------- */
.donate-banner { background: linear-gradient(120deg, var(--header-dark), var(--header-dark-2)); color: var(--white); text-align: center; border-radius: var(--radius); padding: 50px 30px; margin: 0 20px; }
.donate-banner h2 { color: var(--white); margin-bottom: 12px; }
.donate-banner p { color: rgba(255,255,255,0.9); max-width: 560px; margin: 0 auto 26px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--gray-900); color: #C9D2CD; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 30px; padding-bottom: 40px; }
.footer-logo { color: var(--white); margin-bottom: 14px; }
.footer-col p { font-size: 0.9rem; }
.footer-col h4 { color: var(--white); margin-bottom: 16px; font-size: 1rem; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--green); }
.footer-contact li { display: flex; gap: 6px; align-items: flex-start; margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 18px 0; text-align: center; font-size: 0.82rem; margin-top: 10px; }

/* ---------- Floating WhatsApp + Scroll to Top ---------- */
.floating-whatsapp { position: fixed; bottom: 24px; right: 24px; width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; box-shadow: 0 6px 18px rgba(0,0,0,0.25); z-index: 200; transition: transform .2s ease; animation: pulseWA 2.5s infinite; }
.floating-whatsapp:hover { transform: scale(1.08); }
@keyframes pulseWA { 0% { box-shadow: 0 6px 18px rgba(37,211,102,0.35), 0 0 0 0 rgba(37,211,102,0.4); } 70% { box-shadow: 0 6px 18px rgba(37,211,102,0.35), 0 0 0 14px rgba(37,211,102,0); } 100% { box-shadow: 0 6px 18px rgba(37,211,102,0.35), 0 0 0 0 rgba(37,211,102,0); } }
.scroll-to-top { position: fixed; bottom: 24px; right: 92px; width: 46px; height: 46px; border-radius: 50%; background: var(--gray-900); color: var(--white); border: none; font-size: 1.2rem; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,0.2); z-index: 200; display: none; align-items: center; justify-content: center; transition: transform .2s ease; }
.scroll-to-top.visible { display: flex; }
.scroll-to-top:hover { transform: translateY(-3px); }

/* ---------- My Account ---------- */
.account-grid { display: grid; grid-template-columns: 300px 1fr; gap: 30px; align-items: start; }
.account-card { background: var(--white); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; text-align: center; position: sticky; top: 100px; }
.account-card .avatar { margin: 0 auto; }
.pd-meta { list-style: none; text-align: left; margin-top: 10px; }
.pd-meta li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--card-border); font-size: 0.88rem; }
.pd-meta li strong { color: var(--gray-700); }
.pd-meta li span { color: var(--gray-500); text-align: right; }

/* ---------- Dashboard Cards (My Account listings + Admin panel) ---------- */
.admin-card { background: var(--white); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.admin-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.status-pill { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.status-pending { background: #FEF3C7; color: #92400E; }
.status-approved { background: var(--green-light); color: var(--green-dark); }
.status-rejected { background: #FDECEC; color: #B42323; }
.status-sold { background: var(--blue-light); color: var(--blue-dark); }
.status-removed { background: var(--gray-100); color: var(--gray-500); }

/* ---------- Forms (shared across future modules) ---------- */
.form-card { background: var(--white); box-shadow: var(--shadow); border-radius: var(--radius); padding: 34px; max-width: 720px; margin: 0 auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-group label { font-weight: 600; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea { padding: 12px 14px; border-radius: 8px; border: 1px solid var(--gray-300); font-size: 0.95rem; font-family: inherit; }
.form-group textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 0.82rem; color: var(--gray-500); margin-top: -8px; margin-bottom: 18px; }
.alert { padding: 16px 18px; border-radius: 10px; margin-bottom: 20px; font-size: 0.92rem; }
.alert-success { background: var(--green-light); color: var(--green-dark); }
.alert-error { background: #FDECEC; color: #B42323; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; }
  .how-grid, .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .account-grid { grid-template-columns: 1fr; }
  .account-card { position: static; }
}
@media (max-width: 768px) {
  .navbar-search { display: none; }
  .nav-toggle { display: flex; z-index: 210; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--header-dark);
    flex-direction: column; align-items: flex-start; padding: 20px; gap: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
    display: flex;
    max-height: 0; overflow: hidden; opacity: 0; padding-top: 0; padding-bottom: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
    z-index: 200;
  }
  .nav-links.open { max-height: 600px; opacity: 1; padding-top: 20px; padding-bottom: 20px; overflow-y: auto; }
  .nav-links .nav-dropdown { width: 100%; }
  .nav-links .nav-dropdown-menu { position: static; box-shadow: none; width: 100%; padding: 4px 0 0 12px; display: none; }
  .nav-links .nav-dropdown-menu.open { display: block; }
  /* Hamburger -> X animation */
  .nav-toggle span { transition: transform 0.25s ease, opacity 0.2s ease; transform-origin: center; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .how-grid, .testimonial-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .stats-band { grid-template-columns: 1fr 1fr; gap: 16px; }
}
@media (max-width: 480px) { .product-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Added for: Post Product, Browse/Search, Product Details
   ========================================================================== */

.small-muted { color: var(--gray-500); font-size: 0.85rem; }

.listing-toggle { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--card-border); border-radius: 999px; padding: 8px 18px; margin-right: 10px; cursor: pointer; font-weight: 600; }
.listing-toggle input { accent-color: var(--green); }

/* ---------- Upload dropzone + previews ---------- */
.upload-dropzone { border: 2px dashed var(--card-border); border-radius: var(--radius); padding: 34px 20px; text-align: center; color: var(--gray-500); cursor: pointer; background: var(--gray-50); transition: all .15s ease; }
.upload-dropzone:hover, .upload-dropzone.is-dragover { background: var(--green-light); border-color: var(--green); }
.image-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-top: 12px; }
.image-preview { position: relative; padding-top: 100%; border-radius: 10px; overflow: hidden; background: var(--gray-100); }
.image-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.image-preview .remove-btn { position: absolute; top: 4px; right: 4px; background: rgba(15,23,42,0.65); color: #fff; border: none; border-radius: 50%; width: 22px; height: 22px; font-size: 14px; cursor: pointer; }

/* ---------- Browse / Search layout ---------- */
.browse-layout { display: grid; grid-template-columns: 270px 1fr; gap: 30px; align-items: start; }
.filters-panel { background: var(--white); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; position: sticky; top: 100px; }
.filters-panel h3 { margin-bottom: 16px; }
.filters-panel select, .filters-panel input { width: 100%; padding: 10px; border: 1px solid var(--card-border); border-radius: 8px; font-family: inherit; }
.browse-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.sort-form { display: flex; align-items: center; gap: 8px; }
.sort-form select { padding: 6px 10px; border: 1px solid var(--card-border); border-radius: 8px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 30px; }

@media (max-width: 860px) {
  .browse-layout { grid-template-columns: 1fr; }
  .filters-panel { position: static; }
}

/* ---------- Product Details ---------- */
.pd-layout { display: grid; grid-template-columns: 1fr 420px; gap: 30px; align-items: start; }
.pd-gallery { background: var(--white); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.pd-main-image { aspect-ratio: 4/3; background: var(--gray-100); border-radius: 8px; overflow: hidden; }
.pd-main-image img { width: 100%; height: 100%; object-fit: contain; }
.pd-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pd-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.pd-thumbs img.active { border-color: var(--green); }
.pd-details { background: var(--white); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }

@media (max-width: 900px) {
  .pd-layout { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Professional two-column auth layout (login.php / register.php)
   ========================================================================== */
.auth-section { padding: 0; background: var(--white); }
.auth-shell {
  display: grid; grid-template-columns: 1fr 1fr; min-height: 640px;
  max-width: 1100px; margin: 40px auto; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.auth-brand-panel {
  background: linear-gradient(150deg, var(--header-dark) 0%, var(--header-dark-2) 100%);
  color: #fff; padding: 56px 48px; display: flex; flex-direction: column; justify-content: center;
}
.auth-logo { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 800; color: #fff !important; margin-bottom: 40px; }
.auth-logo strong { color: #7FD99A; }
.auth-brand-panel h2 { font-size: 1.9rem; margin-bottom: 14px; }
.auth-brand-panel p { color: rgba(255,255,255,0.82); margin-bottom: 26px; line-height: 1.6; }
.auth-benefits li { padding: 8px 0; color: rgba(255,255,255,0.92); font-weight: 500; }

.auth-form-panel { padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; background: var(--white); }
.auth-form-panel h1 { font-size: 1.8rem; margin-bottom: 6px; }
.auth-form-panel .auth-sub { color: var(--gray-500); margin-bottom: 26px; }
.auth-switch { text-align: center; margin-top: 20px; color: var(--gray-500); }
.auth-switch a { color: var(--blue); font-weight: 600; }

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; margin: 0; border-radius: 0; }
  .auth-brand-panel { padding: 40px 28px; }
  .auth-form-panel { padding: 40px 28px; }
}

/* ---------- Notifications list (my-account / admin) ---------- */
.notif-list { list-style: none; padding: 0; margin: 0; max-height: 220px; overflow-y: auto; }
.notif-list li { padding: 8px 0; border-bottom: 1px solid var(--card-border); font-size: 0.85rem; color: var(--gray-700); }
.notif-list li:last-child { border-bottom: none; }
.notif-list li.unread { font-weight: 700; color: var(--gray-900, #0F172A); }
.notif-list li.unread::before { content: "● "; color: var(--green); }

.notif-bell { position: relative; cursor: pointer; font-size: 1.2rem; color: rgba(255,255,255,0.9); background:none; border:none; }
.notif-badge { position: absolute; top: -6px; right: -8px; background: #E11D48; color: #fff; font-size: 0.65rem; font-weight: 800; border-radius: 999px; padding: 1px 5px; min-width: 16px; text-align: center; }
.notif-dropdown { width: 300px; }
.notif-dropdown .notif-list { padding: 6px 10px; }

/* ---------- Sold out ---------- */
.badge-sold-out { position: absolute; top: 10px; left: 10px; background: #B42323; color: #fff; font-weight: 700; font-size: 0.72rem; padding: 4px 10px; border-radius: 20px; z-index: 2; }
.product-card.is-sold-out .thumb img { filter: grayscale(60%); opacity: 0.75; }
.btn-disabled { opacity: 0.5; pointer-events: none; cursor: not-allowed; }

/* ---------- Edit-product image management cells ---------- */
.edit-image-cell { padding-bottom: 56px; }
.edit-image-cell .cover-radio, .edit-image-cell .remove-checkbox {
  position: absolute; left: 6px; right: 6px; font-size: 0.72rem; color: #fff;
  background: rgba(15,23,42,0.7); border-radius: 6px; padding: 3px 6px; display: flex; align-items: center; gap: 4px;
}
.edit-image-cell .cover-radio { bottom: 30px; }
.edit-image-cell .remove-checkbox { bottom: 4px; }
.edit-image-cell input { width: auto; margin: 0; }

/* ---------- Google Sign-In button + divider ---------- */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--gray-500); font-size: 0.85rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--card-border); }
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: #3c4043 !important; border: 1px solid var(--card-border);
  font-weight: 600; padding: 11px 16px; border-radius: 8px;
}
.btn-google:hover { background: #f8f9fa; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

/* ---------- Post Product / Request Repair mode switch ---------- */
.post-mode-switch { display: flex; gap: 8px; margin-bottom: 24px; border-bottom: 1px solid var(--card-border); }
.post-mode-tab {
  padding: 12px 18px; font-weight: 700; color: var(--gray-500) !important;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.post-mode-tab:hover { color: var(--gray-700) !important; }
.post-mode-tab.active { color: var(--green-dark) !important; border-bottom-color: var(--green); }

/* ---------- Repair request: common problems checklist + estimate note ---------- */
.repair-estimate-note {
  background: #FFF8E6; border: 1px solid #F5D98C; color: #7A5A00;
  border-radius: 10px; padding: 12px 16px; font-size: 0.88rem; line-height: 1.5;
}
.problems-checklist {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px;
  background: var(--gray-50, #F8FAFC); border: 1px solid var(--card-border, #E2E8F0);
  border-radius: 10px; padding: 14px;
}
.problem-checkbox { display: flex; align-items: flex-start; gap: 8px; font-size: 0.9rem; font-weight: 500; cursor: pointer; }
.problem-checkbox input { margin-top: 3px; accent-color: var(--green); }

/* ---------- Technician Skills page: rows + checklist ---------- */
.skill-row {
  border: 1px solid var(--card-border, #E2E8F0); border-radius: 10px;
  padding: 16px; margin-bottom: 16px; background: var(--gray-50, #F8FAFC);
}
.skills-checklist {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 16px;
  background: var(--white, #fff); border: 1px solid var(--card-border, #E2E8F0);
  border-radius: 8px; padding: 12px; margin-top: 4px;
}
.skill-check { display: flex; align-items: flex-start; gap: 8px; font-size: 0.9rem; font-weight: 500; cursor: pointer; }
.skill-check input { margin-top: 3px; accent-color: var(--green); }

/* ---------- Account sidebar nav (My Account / My Listings / My Repair Requests) ---------- */
.account-sidebar-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--card-border); }
.account-sidebar-nav a { padding: 9px 12px; border-radius: 8px; font-weight: 600; font-size: 0.92rem; color: var(--gray-700) !important; }
.account-sidebar-nav a:hover { background: var(--gray-50); }
.account-sidebar-nav a.active { background: var(--green-light); color: var(--green-dark) !important; }

/* ---------- Quick-link tiles on My Account ---------- */
.dashboard-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dashboard-tile { background: var(--white); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; text-align: center; }
.dashboard-tile .tile-count { font-size: 2rem; font-weight: 800; color: var(--green-dark); margin: 8px 0; }
@media (max-width: 640px) { .dashboard-tiles { grid-template-columns: 1fr; } }

/* ---------- Quote comparison table (admin + customer views) ---------- */
.quote-compare-card { border: 1px solid var(--card-border); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
.quote-compare-card.is-selected { border-color: var(--green); background: var(--green-light); }
