/* ==========================================================================
   TYLO - Premium Accessories Page CSS
   Theme: Black + White + Mint Glossy Premium + Bhagwa Highlights
   ========================================================================== */

:root {
  --bold-black: #020202;
  --soft-black: #1a1a1a;
  --charcoal: #2a2a2a;
  --white: #ffffff;
  --off-white: #f4fdf8;

  --mint-primary: #2ebf91;
  --mint-light: #a8ff78;
  --mint-gradient: linear-gradient(145deg, #a8ff78, #2ebf91);
  --mint-gloss-shadow: 0 4px 12px rgba(46, 191, 145, 0.25);

  --saffron-primary: #e67300;
  --saffron-gradient: linear-gradient(145deg, #ff9933, #e67300);
  --saffron-gloss-shadow: 0 4px 12px rgba(230, 115, 0, 0.25);

  --border-delicate: 1px solid rgba(0, 0, 0, 0.08);
  --shadow-premium: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 12px 35px rgba(46, 191, 145, 0.15);
  
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background-color: var(--off-white);
  color: var(--bold-black);
  -webkit-font-smoothing: antialiased;
}

/* --- HEADER STRIP (Mint Glossy 3D) --- */
.header-main {
  background: var(--mint-gradient);
  border-bottom: 2px solid #147a51;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.4), 0 4px 15px rgba(0,0,0,0.1);
}
.header-container {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1536px; margin: 0 auto; padding: 12px 32px; gap: 24px;
}
.brand-section { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.header-logo { height: 40px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }
.brand-text { display: flex; flex-direction: column; justify-content: center; }
.brand-title {
  font-size: 24px; font-weight: 900; letter-spacing: 2px;
  background: var(--saffron-gradient);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0px 2px 2px rgba(0,0,0,0.2));
}
.brand-subtitle {
  font-size: 10px; font-weight: 800; letter-spacing: 4px;
  color: var(--bold-black); text-shadow: 0 1px 1px rgba(255,255,255,0.4);
}

/* Search Layout - UI RULE OVERRIDE: Left shift & Wider */
.search-action-area { 
  display: flex; align-items: center; gap: 24px; flex: 1; 
  justify-content: flex-start; padding-left: 32px; 
}
.search-container {
  display: flex; align-items: center; background: var(--white);
  border-radius: 20px; padding: 6px 16px; width: 100%; max-width: 600px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}
.search-input { border: none; outline: none; flex: 1; font-size: 14px; font-weight: 500; }
.search-btn { background: transparent; border: none; cursor: pointer; display: flex; }
.search-icon-semantic {
  width: 14px; height: 14px; border: 2px solid var(--charcoal); border-radius: 50%; position: relative;
}
.search-icon-semantic::after {
  content: ''; position: absolute; width: 2px; height: 6px; background: var(--charcoal);
  bottom: -4px; right: -3px; transform: rotate(-45deg);
}

/* Actions pushed right */
.user-actions { display: flex; gap: 16px; margin-left: auto; }
.dropdown-trigger {
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3);
  color: var(--bold-black); font-weight: 700; padding: 6px 12px; border-radius: 6px;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: var(--transition-smooth);
}
.dropdown-trigger:hover { background: var(--white); transform: translateY(-1px); }
.dropdown-menu { display: none; position: absolute; background: var(--white); margin-top: 10px; border-radius: 8px; padding: 8px 0; box-shadow: var(--shadow-premium); min-width: 150px; z-index: 2000; }
.dropdown-wrapper:hover .dropdown-menu { display: block; }
.dropdown-item { padding: 10px 20px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--soft-black); }
.dropdown-item:hover { background: rgba(46, 191, 145, 0.1); color: var(--mint-primary); }

/* --- WHITE CATEGORY STRIP --- */
.category-strip { background: var(--white); border-bottom: var(--border-delicate); box-shadow: 0 2px 10px rgba(0,0,0,0.02); }
.category-list { display: flex; justify-content: center; gap: 40px; list-style: none; padding: 0 32px; max-width: 1536px; margin: 0 auto; }
.category-item { padding: 16px 0; position: relative; }
.category-link { text-decoration: none; font-size: 14px; font-weight: 700; color: #147a51; transition: var(--transition-smooth); }
.category-item:hover .category-link, .active-category { color: var(--saffron-primary); }
.category-item::before { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 3px; background: var(--saffron-gradient); transition: width 0.3s; }
.category-item:hover::before, .active-category::before { width: 100%; }

/* --- MAIN BODY LAYOUT --- */
.premium-tiles-layout {
  display: flex; max-width: 1536px; margin: 24px auto; padding: 0 32px; gap: 32px; align-items: flex-start;
}

/* --- LEFT FILTER PANEL --- */
.filter-panel {
  flex: 0 0 280px;
  background: var(--white); border-radius: 12px;
  box-shadow: var(--shadow-card); padding: 24px; position: sticky;
  top: 90px; max-height: calc(100vh - 120px); overflow-y: auto;
}
.filter-panel::-webkit-scrollbar { width: 6px; }
.filter-panel::-webkit-scrollbar-thumb { background: rgba(46,191,145,0.4); border-radius: 4px; }

.filter-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 2px solid #f0f0f0; padding-bottom: 12px; }
.filter-header h2 { font-size: 18px; font-weight: 900; color: var(--bold-black); }
.clear-btn { background: none; border: none; color: var(--saffron-primary); font-size: 12px; font-weight: 700; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; }
.clear-btn:hover { text-decoration: underline; }

.filter-section { margin-bottom: 20px; border-bottom: 1px solid #f0f0f0; padding-bottom: 16px; }
.filter-section.border-none { border-bottom: none; }
.filter-title { font-size: 14px; font-weight: 800; margin-bottom: 12px; color: var(--soft-black); text-transform: uppercase; letter-spacing: 0.5px;}

.filter-toggle { cursor: pointer; display: flex; justify-content: space-between; align-items: center; user-select: none; }
.toggle-icon { font-size: 16px; font-weight: 400; color: var(--mint-primary); }
.filter-options.collapsed { display: none; }

.filter-options { display: flex; flex-direction: column; gap: 10px; max-height: 250px; overflow-y: auto; }
.filter-options::-webkit-scrollbar { width: 4px; }
.filter-options::-webkit-scrollbar-thumb { background: #eee; border-radius: 4px; }

.filter-options label {
  display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500;
  color: var(--charcoal); cursor: pointer; transition: color 0.2s;
}
.filter-options label:hover { color: var(--mint-primary); }
.filter-options input[type="checkbox"] {
  appearance: none; width: 16px; height: 16px; border: 2px solid #ccc; border-radius: 4px;
  cursor: pointer; position: relative; transition: var(--transition-smooth);
}
.filter-options input[type="checkbox"]:checked {
  background: var(--mint-gradient); border-color: var(--mint-primary);
}
.filter-options input[type="checkbox"]:checked::after {
  content: '✔'; position: absolute; color: white; font-size: 10px; top: -1px; left: 2px;
}

.price-inputs { display: flex; align-items: center; gap: 8px; }
.price-inputs input { width: 45%; padding: 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; outline: none; }
.price-inputs input:focus { border-color: var(--mint-primary); }
.price-inputs span { font-size: 13px; font-weight: 600; color: #888; }

/* --- RIGHT MAIN CONTENT --- */
.main-content-area { flex: 1; display: flex; flex-direction: column; gap: 24px; }

.top-sort-bar {
  background: var(--white); padding: 16px 24px; border-radius: 12px;
  box-shadow: var(--shadow-card); display: flex; align-items: center; gap: 16px;
}
.sort-label { font-size: 14px; font-weight: 800; color: var(--bold-black); }
.sort-options { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.sort-item {
  font-size: 13.5px; font-weight: 600; color: #888; cursor: pointer; transition: var(--transition-smooth);
  padding-bottom: 4px; position: relative;
}
.sort-item:hover { color: var(--mint-primary); }
.sort-item.active { color: var(--saffron-primary); }
.sort-item.active::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: var(--saffron-gradient); }

/* Product Grid (4 Cols Desktop) */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* --- PRODUCT CARD --- */
.product-card {
  background: var(--white); border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow-card); transition: transform 0.4s ease, box-shadow 0.4s ease;
  position: relative; border: 1px solid rgba(0,0,0,0.03); display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-card-hover); border: 1px solid rgba(46, 191, 145, 0.3); }

.card-image-box { position: relative; height: 180px; width: 100%; overflow: hidden; background: #f9f9f9; }
.card-image-box img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.product-card:hover .card-image-box img { transform: scale(1.08); }

.fav-btn {
  position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(255,255,255,0.9);
  border: none; border-radius: 50%; width: 32px; height: 32px; font-size: 14px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: transform 0.2s;
}
.fav-btn:hover { transform: scale(1.15); }

.card-details { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.card-brand { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--saffron-primary); text-transform: uppercase; margin-bottom: 4px; }
.card-title { font-size: 14px; font-weight: 700; color: var(--bold-black); margin-bottom: 4px; line-height: 1.3; transition: color 0.3s; }
.product-card:hover .card-title { color: #147a51; }

.card-meta { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.card-subcat { font-size: 9px; font-weight: 600; padding: 2px 6px; border-radius: 4px; background: rgba(0,0,0,0.04); color: var(--charcoal); }

.card-price-row { margin-top: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.price-current { font-size: 16px; font-weight: 900; color: var(--bold-black); }
.price-original { font-size: 13px; font-weight: 500; color: #aaa; text-decoration: line-through; }

/* --- LAZY LOADING --- */
.loading-sentinel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; gap: 12px; width: 100%; }
.loader-spinner { width: 32px; height: 32px; border: 4px solid rgba(46, 191, 145, 0.2); border-top-color: var(--mint-primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }