/* ============================================
   DUSHOP — Clean White Header & Deep Charcoal Footer Theme
   ============================================ */
:root {
  --bg-white: #FFFFFF;
  --bg-gray: #F5F5F5;
  --text-main: #111111;
  --text-muted: #6e6e73;
  --charcoal: #151922;
  --line: rgba(17, 17, 17, 0.08);
  --line-dark: rgba(255, 255, 255, 0.12);

  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html { 
  scroll-behavior: smooth; 
}

body {
  font-family: var(--font-body);
  background: var(--bg-white);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { 
  display: block; 
  max-width: 100%; 
}

a { 
  color: inherit; 
  text-decoration: none; 
}

button { 
  font-family: inherit; 
  cursor: pointer; 
}

ul { 
  list-style: none; 
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ============================================
   1. Editorial Header (Clean White Theme)
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 40px;
  position: relative;
}

.logo {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1d1d1f;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img { 
  height: 38px; 
  width: auto; 
}

.nav-links {
  display: flex;
  gap: 36px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #515154;
  align-items: center;
  margin: 0 auto;
}

.nav-links a {
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.nav-links a:hover, 
.nav-links a.active { 
  color: #1d1d1f; 
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #1d1d1f;
  cursor: pointer;
}

.nav-menu { 
  display: none; 
}

/* ============================================
   2. Shop / Catalog Header & Filters
   ============================================ */
.shop-header {
  background: var(--bg-gray);
  padding: 60px 40px 36px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.shop-header h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.03em;
  color: var(--text-main);
  text-align: left;
}

.shop-header p {
  color: var(--text-muted);
  margin-top: 8px;
  font-size: 15px;
  text-align: left;
  max-width: 700px;
}

.filter-bar {
  position: sticky;
  top: 73px;
  z-index: 90;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.filter-bar-inner {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.tm-search {
  flex: 1 1 280px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-gray);
  border: 1px solid var(--line);
  padding: 10px 18px;
}

.tm-search input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 13.5px;
  color: var(--text-main);
}

.tm-select {
  border: 1px solid var(--line);
  background: var(--bg-gray);
  padding: 10px 18px;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
}

/* Multi-select Filter Pills */
.ms-row {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
}

.ms-dropdown {
  position: relative;
}

.ms-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-gray);
  border: 1px solid var(--line);
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-main);
  cursor: pointer;
}

.ms-trigger:hover, 
.ms-dropdown.is-open .ms-trigger {
  border-color: var(--text-main);
}

.ms-trigger.has-selection {
  background: var(--text-main);
  color: #fff;
  border-color: var(--text-main);
}

.ms-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 95;
  background: #fff;
  border: 1px solid var(--text-main);
  padding: 12px;
  min-width: 180px;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.ms-dropdown.is-open .ms-panel { 
  display: block; 
}

.ms-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}

.ms-option:hover { 
  background: var(--bg-gray); 
}

.ms-option input { 
  accent-color: var(--text-main); 
}

/* ============================================
   3. Product / Catalog Rows (Desktop Grid Layout)
   ============================================ */
.tire-list { 
  display: flex; 
  flex-direction: column; 
}

.tire-row,
.x4-row {
  display: grid !important;
  grid-template-columns: 80px minmax(0, 1fr) auto !important;
  gap: 20px !important;
  align-items: center !important;
  padding: 18px 20px !important;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}

.tire-row:hover,
.x4-row:hover { 
  background: var(--bg-gray); 
}

/* Thumbnail Picture Container */
.tire-row-media, 
.x4-row-media {
  display: flex !important;
  width: 80px !important;
  height: 80px !important;
  min-width: 80px !important;
  min-height: 80px !important;
  background: #f8f9fa !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  cursor: zoom-in;
}

.tire-row-media img, 
.x4-row-media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  padding: 4px;
  transition: transform 0.3s ease;
}

.tire-row:hover .tire-row-media img,
.x4-row:hover .x4-row-media img { 
  transform: scale(1.05); 
}

.tire-row-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.tm-badges { 
  display: flex; 
  gap: 6px; 
  flex-wrap: wrap; 
  margin-top: 6px; 
}

.tm-badge {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: var(--bg-gray);
  color: var(--text-muted);
  border: 1px solid var(--line);
}

.tm-badge.stock { 
  background: var(--text-main); 
  color: #fff; 
  border-color: var(--text-main); 
}

/* Price & Button Container */
.tire-row-right {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 8px !important;
  text-align: right !important;
}

.tire-row-price { 
  font-family: var(--font-mono); 
  font-weight: 700; 
  font-size: 16px; 
  color: var(--text-main); 
}

/* ============================================
   4. Lightbox & Modals
   ============================================ */
.image-lightbox, 
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.image-lightbox.is-open, 
.product-modal.is-open { 
  display: flex; 
}

.image-lightbox-backdrop, 
.product-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 14, 28, 0.85);
  backdrop-filter: blur(4px);
}

.image-lightbox-img {
  position: relative;
  max-width: 480px;
  max-height: 65vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
  z-index: 2;
}

.product-modal-panel {
  position: relative;
  background: #fff;
  border-radius: 0px;
  max-width: 520px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.3);
  z-index: 2;
}

/* ============================================
   5. Deep Charcoal Footer (#151922)
   ============================================ */
.footer, 
.site-footer {
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.85);
  padding: 70px 40px 35px;
  font-size: 13.5px;
  border-top: 1px solid var(--line-dark);
}

.site-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 45px;
}

.site-footer-col h4 {
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.site-footer-col p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
}

.site-footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer-col ul li a {
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.15s ease;
}

.site-footer-col ul li a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.site-footer-col p[data-setting] {
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-weight: 600;
}

.site-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line-dark);
  padding-top: 25px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* ============================================
   6. Responsive Media Queries (Mobile & Tablet)
   ============================================ */
@media (max-width: 768px) {
  .nav-links { 
    display: none; 
  }
  
  .nav-toggle { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 40px; 
    height: 40px; 
  }
  
  /* Mobile Hamburger Menu Dropdown */
  .nav.is-menu-open .nav-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; 
    left: 0; 
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding: 20px 30px;
    z-index: 999;
    gap: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  }
  
  .nav.is-menu-open .nav-menu a { 
    color: #1d1d1f; 
    font-weight: 700; 
    font-size: 14px; 
  }
}

@media (max-width: 720px) {
  .container { 
    padding: 0 20px; 
  }
  
  .nav-inner { 
    padding: 16px 20px; 
  }
  
  .shop-header { 
    padding: 40px 20px 24px; 
  }
  
  /* Mobile Grid Layout para hindi magpatong-patong ang larawan at teksto */
  .tire-row,
  .x4-row { 
    display: grid !important;
    grid-template-columns: 64px minmax(0, 1fr) !important; 
    gap: 12px !important; 
    align-items: start !important;
    padding: 14px 10px !important;
  }
  
  .tire-row-media, 
  .x4-row-media { 
    width: 64px !important; 
    height: 64px !important; 
    min-width: 64px !important;
    min-height: 64px !important;
  }
  
  .tire-row-right { 
    grid-column: 2 / -1 !important; 
    flex-direction: row !important; 
    justify-content: space-between !important; 
    align-items: center !important; 
    width: 100% !important;
    margin-top: 6px !important;
    padding-top: 6px !important;
    border-top: 1px solid rgba(0,0,0,0.05);
  }
  
  .site-footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}