/*
 * ============================================================
 *  APPLE OVERRIDE — Phase 2 (Catalog Storefront)
 *  Loads AFTER stylesheet.css and apple-design-system/*.css
 *  Overrides theme569 visuals with Apple Design System tokens.
 * ============================================================
 */

/* ============================================================
   A. GLOBAL RESETS & BODY
   ============================================================ */

body {
  font-family: var(--font-system);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  color: var(--apple-label);
  background: var(--apple-bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-system);
  color: var(--apple-label);
  letter-spacing: var(--ls-tight);
}

h1, h2, h3 {
  font-weight: var(--fw-bold);      /* 700 — Large Title, Title 1, Title 2 */
}

h4, h5, h6 {
  font-weight: var(--fw-semibold);  /* 600 — Title 3, Headline, Subheadline */
}

h1 { font-size: var(--text-large-title); line-height: var(--lh-large-title); }
h2 { font-size: var(--text-title1);      line-height: var(--lh-title1); }
h3 { font-size: var(--text-title2);      line-height: var(--lh-title2); }
h4 { font-size: var(--text-title3);      line-height: var(--lh-title3); }
h5 { font-size: var(--text-headline);    line-height: var(--lh-headline); }
h6 { font-size: var(--text-subheadline); line-height: var(--lh-subheadline); }

a {
  color: var(--apple-link);
  transition: var(--transition-fast);
}
a:hover {
  color: var(--apple-brand-blue-hover);
  text-decoration: none;
}

p {
  font-size: var(--text-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
  color: var(--apple-label);
  margin-bottom: var(--space-4);
}

label {
  font-family: var(--font-system);
  font-size: var(--text-footnote);
  font-weight: var(--fw-medium);
  color: var(--apple-secondary-label);
}

label, input, button, select, textarea {
  font-family: var(--font-system);
}

legend {
  font-size: var(--text-callout);
  font-weight: var(--fw-semibold);
  color: var(--apple-label);
}

.section1, #page {
  background: var(--apple-bg-secondary);
}

.section1 {
  padding-top: 48px;
  padding-bottom: 32px;
}

@media (max-width: 767px) {
  .section1 {
    padding-top: 16px;
    padding-bottom: 16px;
  }
}

.section1 > .container {
  max-width: 1200px;
}

.text-danger {
  color: var(--apple-red);
}

#content {
  padding-top: 24px;
}

div.required .control-label:before {
  color: var(--apple-red);
}

/* ============================================================
   B. HEADER / NAVIGATION
   ============================================================ */

.header {
  background: var(--apple-glass-cool);
  box-shadow: none;
}

.header .header-container {
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.header .info address {
  font-family: var(--font-system);
  font-size: var(--text-headline);
  color: var(--apple-label);
}
.header .info address a:hover,
.header .info address a:before {
  color: var(--apple-brand-blue);
}

/* Nav bar */
.header .bg-line {
  background: var(--apple-nav-glass);
  backdrop-filter: var(--glass-backdrop-standard);
  -webkit-backdrop-filter: var(--glass-backdrop-standard);
  box-shadow: var(--shadow-toolbar);
  isolation: isolate;
}
.header .bg-line:after {
  background: var(--apple-brand-blue);
  height: 2px;
}

/* Dropdowns */
.header .dropdown-menu {
  background: rgba(237, 242, 248, 0.88);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--apple-border-glass);
  box-shadow: 0 10px 40px rgba(60, 90, 140, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.header .dropdown-menu > li > a,
.header .dropdown-menu > li > button {
  color: var(--apple-label);
  font-family: var(--font-system);
  font-size: var(--text-footnote);
  transition: var(--transition-fast);
}
.header .dropdown-menu > li > a:hover,
.header .dropdown-menu > li > button:hover {
  background: var(--apple-fill-quaternary);
  color: var(--apple-brand-blue);
  border-radius: var(--radius-xs);
}

/* Search */
.search input {
  font-family: var(--font-system);
  font-size: var(--text-body);
  color: var(--apple-label);
  background: var(--apple-fill-tertiary);
  border: 1px solid var(--apple-separator-opaque);
  border-radius: var(--radius-input);
  height: var(--touch-target-ios);
  padding: var(--space-3) var(--space-8) var(--space-3) var(--space-4);
  transition: var(--transition-fast);
}
.search input:focus {
  background: var(--apple-bg-primary);
  border-color: var(--apple-brand-blue);
  box-shadow: 0 0 0 3px var(--apple-blue-glow);
  outline: none;
}
.search input::placeholder { color: var(--apple-placeholder); }
.search input::-webkit-input-placeholder { color: var(--apple-placeholder); }

.search button { color: var(--apple-gray); transition: var(--transition-fast); }
.search button:hover { color: var(--apple-brand-blue); }

/* Live search results */
#livesearch_search_results {
  background: var(--apple-nav-glass);
  backdrop-filter: var(--glass-backdrop-standard);
  -webkit-backdrop-filter: var(--glass-backdrop-standard);
  border-radius: var(--radius-menu);
  box-shadow: var(--shadow-menu);
  border: 0.5px solid var(--apple-separator);
}
#livesearch_search_results li:hover {
  background: var(--apple-fill-quaternary);
  border-radius: var(--radius-xs);
}
#livesearch_search_results a { color: var(--apple-label); }
#livesearch_search_results li:hover a { color: var(--apple-brand-blue); }

/* Top nav links */
.nav a {
  font-family: var(--font-system);
  font-size: var(--text-caption1);
  color: var(--apple-gray);
  letter-spacing: var(--ls-loose);
  text-transform: none;
  transition: var(--transition-fast);
}
.nav a:hover, .nav a .active {
  color: var(--apple-brand-blue);
}

/* Language/currency dropdowns */
.box-language .dropdown-toggle,
.box-currency .dropdown-toggle {
  font-family: var(--font-system);
  font-size: var(--text-callout);
  color: var(--apple-brand-blue);
  text-transform: none;
}
.box-currency .dropdown-menu a,
.box-currency .dropdown-menu button,
.box-language .dropdown-menu a,
.box-language .dropdown-menu button {
  font-family: var(--font-system);
  color: var(--apple-label);
}

/* Cart button */
.cart > button {
  background: var(--apple-brand-blue);
  color: var(--apple-bg-primary);
  height: var(--touch-target-ios);
  border-radius: var(--radius-button);
  transition: var(--transition-fast);
  box-shadow: var(--shadow-button);
}
.cart > button span,
.cart > button strong {
  font-family: var(--font-system);
  font-size: var(--text-caption1);
}
.cart > button:hover {
  background: var(--apple-brand-blue-hover);
}

.cart .dropdown-menu {
  background: var(--apple-nav-glass);
  backdrop-filter: var(--glass-backdrop-heavy);
  -webkit-backdrop-filter: var(--glass-backdrop-heavy);
  color: var(--apple-label);
  border-radius: var(--radius-menu);
  box-shadow: var(--shadow-menu);
  border: 0.5px solid var(--apple-separator);
}
.cart .dropdown-menu .price-cart { color: var(--apple-brand-blue); }
.cart .dropdown-menu strong { color: var(--apple-label); }
.cart .dropdown-menu .btn-primary {
  background: var(--apple-brand-blue);
  border-radius: var(--radius-button);
}
.cart .dropdown-menu .btn-primary:hover { background: var(--apple-brand-blue-hover); }

/* Swipe menu (mobile) */
.toprow-1 {
  background: var(--apple-bg-primary);
  border-bottom: 1px solid var(--apple-separator-opaque);
}
.swipe-control { border-right: 1px solid var(--apple-separator-opaque); }
.swipe-control:hover i, .swipe-control.active i { color: var(--apple-brand-blue); }
.swipe ul li a {
  background: transparent;
  color: var(--apple-label);
  border-top: 0.5px solid var(--apple-border-glass);
  font-family: var(--font-system);
  font-size: var(--text-callout);
  transition: var(--transition-fast);
}
.swipe ul li a i { color: var(--apple-brand-blue); }
.swipe ul li a:hover {
  background: rgba(0, 113, 227, 0.06);
  color: var(--apple-brand-blue);
}

/* Primary nav */
.nav__primary .menu li { border-right: 1px solid var(--apple-separator-opaque); }
.nav__primary .menu li > a {
  font-family: var(--font-system);
  font-size: var(--text-footnote);
  font-weight: var(--fw-medium);
  color: var(--apple-label);
  letter-spacing: var(--ls-loose);
  text-transform: none;
  transition: var(--transition-fast);
}
.nav__primary .menu li.sfHover > a,
.nav__primary .menu li > a:hover,
.nav__primary .menu li > a.active { color: var(--apple-brand-blue); }

.nav__primary .menu ul {
  background: var(--apple-nav-glass);
  backdrop-filter: var(--glass-backdrop-heavy);
  -webkit-backdrop-filter: var(--glass-backdrop-heavy);
  border: 0.5px solid var(--apple-separator);
  border-radius: var(--radius-menu);
  box-shadow: var(--shadow-menu);
}
.nav__primary .menu ul a {
  font-family: var(--font-system);
  font-size: var(--text-footnote);
  color: var(--apple-label);
}
.nav__primary .menu ul a:hover,
.nav__primary .menu ul li.sfHover > a { color: var(--apple-brand-blue); }
.nav__primary .menu ul ul { border-left: 1px solid var(--apple-separator-opaque); }

.menu-icon {
  background: var(--apple-brand-blue);
  color: var(--apple-bg-primary);
  font-family: var(--font-system);
  border-radius: var(--radius-button);
  transition: var(--transition-fast);
}
.menu-icon:hover { background: var(--apple-brand-blue-hover); }

.menu-gadget .menu a {
  background: var(--apple-bg-secondary);
  color: var(--apple-label);
  border-bottom: 1px solid var(--apple-separator-opaque);
  font-family: var(--font-system);
}
.menu-gadget .menu li.active > a,
.menu-gadget .menu li > a:hover {
  background: var(--apple-fill-quaternary);
  color: var(--apple-brand-blue);
}
.menu-gadget .menu li i { color: var(--apple-brand-blue); }

/* Sticky nav */
.isStuck {
  background: var(--apple-nav-glass);
  backdrop-filter: var(--glass-backdrop-standard);
  -webkit-backdrop-filter: var(--glass-backdrop-standard);
  box-shadow: var(--shadow-toolbar);
}

/* ============================================================
   C. BUTTONS
   ============================================================ */

button, .btn { transition: var(--transition-fast); }

.btn {
  color: var(--apple-label);
}

.btn:visited, .btn-primary, .btn-danger, .btn-icon, .btn {
  font-family: var(--font-system);
  font-size: var(--text-callout);
  border-radius: var(--radius-button);
  border: none;
  box-shadow: var(--shadow-button);
  transition: var(--transition-fast);
}

#compare-total.btn, .btn-primary, .btn-info, .btn-default, .btn-success, .btn-warning {
  width: auto;
  height: auto;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-button);
  font-family: var(--font-system);
  font-size: var(--text-callout);
  color: var(--apple-bg-primary);
}

.btn-primary { background: var(--apple-brand-blue); color: var(--apple-bg-primary); }
.btn-primary:hover { background: var(--apple-brand-blue-hover); color: var(--apple-bg-primary); }

.btn-danger { background: var(--apple-red); color: var(--apple-bg-primary); }
.btn-danger:hover { background: var(--apple-red); opacity: 0.8; color: var(--apple-bg-primary); }

.btn-info { background: var(--apple-blue); }
.btn-success { background: var(--apple-green); }
.btn-warning { background: var(--apple-orange); }

.btn-default {
  background: var(--apple-glass-cool);
  backdrop-filter: blur(8px) saturate(150%);
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  color: var(--apple-label);
  border: 0.5px solid var(--apple-border-glass);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.6);
}
.btn-default:hover {
  background: var(--apple-glass-warm);
  color: var(--apple-label);
  border-color: var(--apple-border-card);
  box-shadow: 0 2px 8px rgba(60,90,140,0.10), inset 0 1px 0 rgba(255,255,255,0.7);
}

.btn:hover, .btn:focus {
  box-shadow: var(--shadow-md);
}
.btn:focus { outline: none; }

.btn.mod1 { background: var(--apple-brand-blue); }

.product-btn {
  background: var(--apple-gray);
  color: var(--apple-bg-primary);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-button);
  font-family: var(--font-system);
  transition: var(--transition-fast);
}
.product-btn:hover { background: var(--apple-gray2); }

.product-btn-add, .btn-add {
  background: var(--apple-brand-blue);
  color: var(--apple-bg-primary);
  border-radius: var(--radius-button);
  font-family: var(--font-system);
  transition: var(--transition-fast);
}
.product-btn-add:hover, .btn-add:hover { background: var(--apple-brand-blue-hover); }

.product-options .btn-default {
  background: var(--apple-fill-tertiary);
  color: var(--apple-label);
  border: 1px solid var(--apple-separator-opaque);
  border-radius: var(--radius-sm);
}

#content .table-responsive .btn-primary { background: var(--apple-brand-blue); }
#content .table-responsive .btn-primary:hover { background: var(--apple-brand-blue-hover); }

.product-buttons .btn { font-size: var(--text-body); font-family: var(--font-system); }

/* Datepicker */
.datepicker .prev:hover, .datepicker .next:hover,
.datepicker .day:hover, .datepicker .day.active,
.datepicker .month:hover, .datepicker .year:hover {
  color: var(--apple-brand-blue);
}
.datepicker .day.active:hover { background: var(--apple-fill-secondary); }

/* ============================================================
   D. FORMS & INPUTS
   ============================================================ */

select, textarea,
input[type="text"], input[type="password"], input[type="datetime"],
input[type="datetime-local"], input[type="date"], input[type="month"],
input[type="time"], input[type="week"], input[type="number"],
input[type="email"], input[type="url"], input[type="search"],
input[type="tel"], input[type="color"], .uneditable-input {
  font-family: var(--font-system);
  font-size: var(--text-subheadline);
  border-radius: var(--radius-input);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
  background: rgba(255, 255, 255, 0.92);
  color: var(--apple-label);
  border: 1px solid var(--apple-border-card);
  transition: var(--transition-fast);
}

.form-control:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--apple-brand-blue);
  box-shadow: 0 0 0 3px var(--apple-blue-glow), inset 0 1px 2px rgba(0, 0, 0, 0.02);
  outline: none;
  background: #FFFFFF;
}

/* Contact form card wrapper */
.information-contact #content fieldset,
.account-login #content .well,
.account-register #content fieldset {
  background: var(--apple-bg-primary);
  border-radius: var(--radius-card);
  padding: var(--space-5);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  margin-bottom: var(--space-5);
}

/* ============================================================
   E. CARDS & CONTAINERS
   ============================================================ */

.well {
  background: var(--apple-bg-primary);
  border: 1px solid var(--apple-separator-opaque);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-7);
}
.well .heading i { color: var(--apple-brand-blue); }
.well .heading h2 {
  font-family: var(--font-system);
  font-size: var(--text-title2);
  color: var(--apple-label);
}
.well p {
  border-top-color: var(--apple-separator-opaque);
  border-bottom-color: var(--apple-separator-opaque);
}

.thumbnail {
  background: var(--apple-bg-primary);
  border: 1px solid var(--apple-separator-opaque);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: var(--space-3);
}
.thumbnail img { border-radius: var(--radius-sm); }

.img-thumbnail {
  border: none;
  background: var(--apple-fill-quaternary);
  border-radius: var(--radius-sm);
}

.product-thumb {
  background: var(--apple-glass-card);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid var(--apple-border-card);
  border-radius: 16px;
  box-shadow:
    0 4px 20px rgba(60, 90, 140, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.70);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.35s ease;
  overflow: hidden;
}
.product-thumb:hover {
  transform: translateY(-5px);
  box-shadow:
    0 16px 48px rgba(60, 90, 140, 0.14),
    0 4px 12px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  border-color: rgba(160, 195, 230, 0.70);
}

.product-thumb .name {
  font-family: var(--font-system);
  font-size: var(--text-footnote);
  font-weight: var(--fw-medium);
  color: var(--apple-secondary-label);
  text-transform: none;
}
.product-thumb .name a:hover { color: var(--apple-brand-blue); }

.product-thumb .description {
  font-family: var(--font-system);
  font-size: var(--text-caption1);
  color: var(--apple-secondary-label);
}

.box .box-heading h3 {
  background: var(--apple-bg-secondary);
  color: var(--apple-label);
  font-family: var(--font-system);
  font-size: var(--text-title3);
  font-weight: var(--fw-semibold);
  text-transform: none;
  letter-spacing: var(--ls-tight);
  padding: var(--space-6) var(--space-8);
  border-radius: var(--radius-md);
}

aside .box .box-heading h3 {
  text-align: left;
  font-size: var(--text-subheadline);
}

.panel-group .panel, .panel {
  border-radius: var(--radius-card);
  border: 1px solid var(--apple-border-card);
  background: var(--apple-glass-card);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  box-shadow: 0 4px 16px rgba(60, 90, 140, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  overflow: hidden;
}
.panel-heading {
  padding: var(--space-5);
  background: var(--apple-bg-secondary);
}

/* ============================================================
   F. FOOTER
   ============================================================ */

footer {
  background: var(--apple-bg-secondary);
  color: var(--apple-label);
  border-top: 0.5px solid var(--apple-border-glass);
  padding-top: 32px;
  position: relative;
}
footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 113, 227, 0.20), transparent);
  pointer-events: none;
}
footer h5 {
  font-family: var(--font-system);
  font-size: var(--text-footnote);
  font-weight: var(--fw-semibold);
  color: var(--apple-label);
  text-transform: none;
  letter-spacing: var(--ls-tight);
}
footer h5 + ul {
  font-size: var(--text-caption1);
  line-height: var(--lh-caption1);
  color: var(--apple-secondary-label);
}
footer a { color: var(--apple-brand-blue); }
footer a:hover { color: var(--apple-brand-blue-hover); }

.copyright {
  background: var(--apple-bg-tertiary);
  color: var(--apple-secondary-label);
  font-family: var(--font-system);
  font-size: var(--text-caption2);
  border-top: 0.5px solid var(--apple-border-glass);
  padding: 16px 0;
  margin-top: 0;
}
.copyright > .container a:hover { color: var(--apple-brand-blue); }

.footer-divider {
  width: 1px;
  height: 30px;
  background-color: var(--apple-separator-opaque);
}

.toTop {
  background: rgba(0, 113, 227, 0.85);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  color: #FFFFFF;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 113, 227, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: var(--transition-fast);
}
.toTop:hover {
  background: rgba(0, 119, 237, 0.92);
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(0, 113, 227, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* ============================================================
   G. TABLES
   ============================================================ */

.table thead td {
  color: var(--apple-label) !important;
  font-family: var(--font-system);
  font-size: var(--text-footnote);
  font-weight: var(--fw-semibold);
  text-transform: none;
  letter-spacing: var(--ls-loose);
  background: var(--apple-glass-cool);
  border-color: var(--apple-border-card);
}

.table th, .table td {
  border-color: var(--apple-separator-opaque);
  font-family: var(--font-system);
  font-size: var(--text-footnote);
}

.table-bordered,
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
  border-color: var(--apple-separator-opaque);
}

.table-bordered,
.table-bordered thead:first-child tr:first-child > th:last-child,
.table-bordered tbody:first-child tr:first-child > td:last-child,
.table-bordered thead:first-child tr:first-child > th:first-child,
.table-bordered tbody:first-child tr:first-child > td:first-child,
.table-bordered thead:last-child tr:last-child > th:first-child,
.table-bordered tbody:last-child tr:last-child > td:first-child,
.table-bordered tfoot:last-child tr:last-child > td:first-child {
  border-radius: var(--radius-card);
}

/* ============================================================
   H. PAGINATION
   ============================================================ */

.pagination > li:last-child > a,
.pagination > li:last-child > span,
.pagination > li:first-child > a,
.pagination > li:first-child > span {
  border-radius: var(--radius-button);
}

.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover {
  background: var(--apple-brand-blue);
  border-color: var(--apple-brand-blue);
  color: var(--apple-bg-primary);
  border-radius: var(--radius-button);
}

.pagination > li > a, .pagination > li > span {
  color: var(--apple-secondary-label);
  font-family: var(--font-system);
  font-size: var(--text-footnote);
  border-radius: var(--radius-button);
  border-color: var(--apple-border-card);
  background: var(--apple-glass-warm);
  transition: var(--transition-fast);
}
.pagination > li > a:hover {
  background: rgba(0, 113, 227, 0.08);
  border-color: var(--apple-border-glass);
  color: var(--apple-brand-blue);
}

/* ============================================================
   I. BREADCRUMB
   ============================================================ */

.breadcrumb {
  background: var(--apple-glass-warm);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  border: 1px solid var(--apple-border-card);
  border-radius: var(--radius-md);
  font-family: var(--font-system);
  font-size: var(--text-subheadline);
  box-shadow: 0 2px 8px rgba(60, 90, 140, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.breadcrumb > li:after {
  border-right-color: var(--apple-separator-opaque);
  border-bottom-color: var(--apple-separator-opaque);
}
.breadcrumb a { color: var(--apple-brand-blue); }
.breadcrumb a:hover { color: var(--apple-brand-blue-hover); }

/* ============================================================
   J. ALERTS
   ============================================================ */

.alert {
  border-radius: var(--radius-lg);
  font-family: var(--font-system);
  font-size: var(--text-footnote);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.alert a { color: var(--apple-bg-primary); text-decoration: underline; }
.alert button.close { color: var(--apple-bg-primary); }
.alert-success {
  background: rgba(52, 199, 89, 0.18);
  color: #1B7A34;
  border-color: rgba(52, 199, 89, 0.30);
}
.alert-success a, .alert-success .close { color: #1B7A34; }
.alert-danger {
  background: rgba(255, 59, 48, 0.14);
  color: #C62828;
  border-color: rgba(255, 59, 48, 0.25);
}
.alert-danger a, .alert-danger .close { color: #C62828; }
.alert-info {
  background: rgba(10, 132, 255, 0.14);
  color: #0055B3;
  border-color: rgba(10, 132, 255, 0.25);
}
.alert-info a, .alert-info .close { color: #0055B3; }
.alert-warning {
  background: rgba(255, 149, 0, 0.16);
  color: #9A5A00;
  border-color: rgba(255, 149, 0, 0.28);
}

/* ============================================================
   K. PRODUCT-SPECIFIC
   ============================================================ */

.price-new, .price-old, .price {
  font-family: var(--font-system);
  font-size: var(--text-title2);
  color: var(--apple-brand-blue);
  font-weight: var(--fw-semibold);
}
.price-old {
  font-size: var(--text-headline);
  font-weight: var(--fw-regular);
  color: var(--apple-gray);
}

.price-section .price-new { font-size: var(--text-title1); color: var(--apple-brand-blue); }
.price-section .price-old { font-size: var(--text-callout); color: var(--apple-gray); }

.price-tax {
  font-family: var(--font-system);
  font-size: var(--text-caption1);
  color: var(--apple-secondary-label);
}

.prod-stock {
  color: var(--apple-green);
  font-family: var(--font-system);
  font-weight: var(--fw-medium);
}

/* Star ratings */
.fa-stack i { color: var(--apple-orange); }

/* Sale/New badges */
.sale, .new_pr {
  background: var(--apple-brand-blue);
  color: var(--apple-bg-primary);
  font-family: var(--font-system);
  font-size: var(--text-caption2);
  border-radius: var(--radius-xs) 0 var(--radius-sm) 0;
}

.product-title {
  font-family: var(--font-system);
  font-size: var(--text-title2);
  color: var(--apple-label);
  font-weight: var(--fw-semibold);
}

#product h3 { color: var(--apple-brand-blue); font-family: var(--font-system); }

.product-thumb .quickview:before {
  color: var(--apple-brand-blue);
  transition: var(--transition-fast);
}

.quickview_description {
  border: 1px solid var(--apple-separator-opaque);
  border-radius: var(--radius-md);
}

/* Gallery */
.product-gallery .image-thumb li a {
  border: 1px solid var(--apple-separator-opaque);
  border-radius: var(--radius-xs);
}
.product-gallery .image-thumb li a:hover,
.product-gallery .image-thumb li a.active {
  border-color: var(--apple-brand-blue);
}

/* Review form */
.review-form-title h3 {
  border-bottom: 1px solid var(--apple-separator-opaque);
  font-family: var(--font-system);
}
.review-form-title h3:hover { color: var(--apple-brand-blue); }

.general_info .product-section,
.general_info .price-section {
  border-bottom: 1px solid var(--apple-separator-opaque);
}

/* Product filter */
.product-filter {
  border-top: 1px solid var(--apple-separator-opaque);
  border-bottom: 1px solid var(--apple-separator-opaque);
}
.product-filter label {
  font-family: var(--font-system);
  font-size: var(--text-footnote);
  color: var(--apple-secondary-label);
}

#list-view, #grid-view {
  color: var(--apple-gray);
  font-size: var(--text-title2);
  transition: var(--transition-fast);
}
#list-view.active, #grid-view.active { color: var(--apple-brand-blue); }

/* Sub-categories */
.box-subcat li .image {
  border: 2px solid var(--apple-separator-opaque);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}
.box-subcat li .image:hover { border-color: var(--apple-brand-blue); }
.box-subcat li .name a {
  font-family: var(--font-system);
  font-size: var(--text-body);
  color: var(--apple-label);
}

/* ============================================================
   L. MISC
   ============================================================ */

.sm_hr {
  background: var(--apple-separator-opaque);
  margin: var(--space-10) 0;
}

.testimonials .user {
  color: var(--apple-brand-blue);
  font-family: var(--font-system);
  font-size: var(--text-caption1);
  font-weight: var(--fw-semibold);
  text-transform: none;
}
.testimonials blockquote {
  border: 1px solid var(--apple-separator-opaque);
  border-radius: var(--radius-md);
}

/* Banners — Apple-style service cards */
.banners {
  margin-bottom: 40px;
}

.banners > div {
  margin-top: 0;
  margin-bottom: 24px;
  padding-left: 15px;
  padding-right: 15px;
}

.banners > div .banner-box {
  background: var(--apple-glass-card);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 20px;
  overflow: visible;
  box-shadow:
    0 8px 32px rgba(60, 100, 160, 0.10),
    0 2px 8px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.banners > div .banner-box:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow:
    0 20px 60px rgba(60, 100, 160, 0.16),
    0 4px 16px rgba(0, 0, 0, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.80);
}

@media (max-width: 767px) {
  .banners .banner-box {
    max-width: 100%;
    width: 100%;
    display: block;
  }
  .banners > div {
    text-align: left;
  }
}

.banners > div .banner-box > a {
  display: block;
  text-decoration: none;
}

.banners > div .banner-box img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 20px 20px 0 0;
}

.banners > div .banner-box:hover img {
  transform: scale(1.04);
}

.banners > div .s-desc {
  background: linear-gradient(to top, rgba(0, 50, 120, 0.65) 0%, rgba(0, 50, 120, 0) 100%);
  padding: 24px 24px 20px;
  border-radius: 0 0 20px 20px;
}

.banners > div .s-desc h1 {
  font-family: var(--font-system);
  font-size: 28px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-tight);
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  position: relative;
  bottom: auto;
  left: auto;
  right: auto;
  margin: 0;
  line-height: 1.2;
  text-align: left;
}

.banners > div .s-desc span {
  background: rgba(0, 113, 227, 0.80);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  color: #ffffff;
  font-family: var(--font-system);
  font-size: 16px;
  font-weight: var(--fw-medium);
  text-transform: none;
  transition: background 0.3s ease, transform 0.3s ease;
  border-radius: 12px;
  padding: 10px 20px;
  display: inline-block;
  margin-top: 8px;
}

.banners > div .s-desc span:after {
  font-size: 20px;
  margin-left: 8px;
}

.banners > div .banner-box a:hover .s-desc span {
  background: var(--apple-brand-blue);
  transform: translateX(4px);
}

/* Account sidebar */
.box.account ul a, .box.affilate ul a {
  border-bottom: 1px solid var(--apple-separator-opaque);
  font-family: var(--font-system);
  font-size: var(--text-body);
  color: var(--apple-label);
  transition: var(--transition-fast);
}
.box.account ul a:before, .box.affilate ul a:before { color: var(--apple-brand-blue); }
.box.account ul a:hover, .box.affilate ul a:hover {
  color: var(--apple-brand-blue);
  background: var(--apple-fill-quaternary);
}

/* Manufacturer list */
.manufacturer-list {
  border: 1px solid var(--apple-separator-opaque);
  border-radius: var(--radius-card);
}
.manufacturer-list .manufacturer-heading {
  background: var(--apple-bg-secondary);
  border-bottom: 1px solid var(--apple-separator-opaque);
  font-family: var(--font-system);
}
.manufacturer-list .manufacturer-heading span {
  background: var(--apple-brand-blue);
  color: var(--apple-bg-primary);
  border-radius: var(--radius-sm);
}

.dropcap {
  background: var(--apple-brand-blue);
  color: var(--apple-bg-primary);
  font-family: var(--font-system);
  border-radius: var(--radius-sm);
}

.information-information {
  font-size: var(--text-body);
  line-height: var(--lh-body);
  font-family: var(--font-system);
  color: var(--apple-label);
}

.information-information h3,
.information-information h4,
.information-information h5 {
  font-family: var(--font-system);
  color: var(--apple-label);
  text-transform: none;
}

.terms_conditions_page h4 {
  text-transform: none;
}

.privacy_page tr > td + td { border-left: 1px solid var(--apple-separator-opaque); }

/* Transitions normalization */
.product-thumb .image > a img,
.lazy img {
  transition: var(--transition-normal);
}

/* ============================================================
   RESPONSIVE OVERRIDES
   ============================================================ */

@media (min-width: 768px) and (max-width: 991px) {
  label, input, button, select, textarea {
    font-size: var(--text-caption1);
  }
}

@media (max-width: 767px) {
  footer { text-align: center; }
}

/* ============================================================
   O. COLOR LEAK FIXES (Phase 4)
   Selectors from stylesheet.css not previously overridden.
   ============================================================ */

/* Input !important override (stylesheet.css line 158 uses !important) */
input, select, textarea {
  color: var(--apple-label) !important;
}

/* Input group addon */
.input-group-addon {
  border-color: var(--apple-separator-opaque);
  background: var(--apple-bg-secondary);
}

/* Background sections */
.bg-section {
  background: var(--apple-bg-secondary);
}

/* Language/currency dropdown open state */
.box-language .open .dropdown-toggle,
.box-currency .open .dropdown-toggle {
  color: var(--apple-brand-blue);
}
.box-language .dropdown-toggle:hover:after,
.box-currency .dropdown-toggle:hover:after {
  color: var(--apple-brand-blue);
}
.box-language .dropdown-toggle:after,
.box-currency .dropdown-toggle:after {
  color: var(--apple-gray);
}

/* Toprow color */
.toprow-1 {
  color: var(--apple-brand-blue);
}

/* Cart sub-elements */
.cart > button span {
  color: var(--apple-bg-primary);
}
.cart > button strong:before {
  color: var(--apple-bg-primary);
}
.cart .cart-total:after {
  color: var(--apple-bg-primary);
}
.cart > button:hover strong:before,
.cart > button:hover span {
  color: var(--apple-brand-blue);
}
.cart .dropdown-menu table.total .text-right {
  color: var(--apple-label);
}
.cart ul > li:first-child tr {
  border-bottom-color: var(--apple-separator-opaque);
}
.cart .total td,
.cart .price-cart {
  color: var(--apple-secondary-label);
}

/* Search vendor placeholder prefixes */
.search input:-moz-placeholder { color: var(--apple-placeholder); }
.search input::-moz-placeholder { color: var(--apple-placeholder); }
.search input:-ms-input-placeholder { color: var(--apple-placeholder); }

/* Live search loading */
#livesearch_search_results li img.loading {
  background: var(--apple-bg-secondary);
}

/* General btn hover — only for default/unstyled buttons */
.btn-default:hover, .btn-default:focus {
  background-color: var(--apple-fill-secondary);
}

/* Menu icon hover states */
.menu-icon:hover {
  color: var(--apple-bg-primary);
}
.menu-icon:hover:after {
  color: var(--apple-bg-primary);
}

/* Menu gadget icon hover */
.menu-gadget .menu li i:hover {
  color: var(--apple-fill-secondary);
}

/* Banner heading color — white on gradient overlay */
.banners > div .s-desc h1 {
  color: #ffffff;
}

/* Review form pointer */
.review-form-title h3:before {
  border-top-color: var(--apple-separator-opaque);
}

/* Gallery controls */
.product-gallery .image-thumb .bx-wrapper .bx-prev:hover,
.product-gallery .image-thumb .bx-wrapper .bx-next:hover {
  background: var(--apple-brand-blue);
}

/* Full gallery border */
#full_gallery #gallery li {
  border: 1px solid var(--apple-separator-opaque);
}

/* BX slider mobile controls */
.bx-wrapper .bx-controls-direction a {
  background: var(--apple-bg-primary);
  color: var(--apple-gray);
}
.bx-wrapper .bx-controls-direction a:hover {
  background: var(--apple-brand-blue);
  color: var(--apple-bg-primary);
}

/* Product thumb price-tax specificity */
.product-thumb .price-tax {
  color: var(--apple-secondary-label);
}

/* Quickview cart button */
.quickview-style .cart-button .btn-icon + .btn-icon {
  background: var(--apple-brand-blue);
}
.quickview-style .cart-button .btn-icon + .btn-icon:hover {
  background: var(--apple-fill-secondary);
}

/* Mobile cart icon */
@media (max-width: 479px) {
  .cart > button:before {
    color: var(--apple-bg-primary);
  }
  .cart > button:hover:before {
    color: var(--apple-brand-blue);
  }
}

/* Responsive table border */
@media (max-width: 767px) {
  .table-responsive .table-bordered {
    border-color: var(--apple-separator-opaque);
  }
}

/* ============================================================
   M. TEXT-TRANSFORM RESETS (Phase 3)
   Apple HIG uses sentence-case everywhere, not ALL-CAPS.
   ============================================================ */

.manufacturer-list .manufacturer-heading span {
  text-transform: none;
}

/* ============================================================
   N. RESPONSIVE TYPOGRAPHY (Phase 3)
   Scale headings for tablets and mobile per Apple HIG.
   ============================================================ */

@media (max-width: 1068px) {
  h1 { font-size: 30px; line-height: 36px; }
  h2 { font-size: 24px; line-height: 30px; }
}

@media (max-width: 767px) {
  h1 { font-size: 28px; line-height: 34px; }
  h2 { font-size: 22px; line-height: 28px; }
  h3 { font-size: 20px; line-height: 25px; }
  h4 { font-size: 17px; line-height: 22px; }

  body {
    font-size: var(--text-subheadline);
    line-height: var(--lh-subheadline);
  }

  p {
    font-size: var(--text-subheadline);
    line-height: var(--lh-subheadline);
  }
}

/* ============================================================
   P. GEOMETRY — BORDER-RADIUS, SHADOWS, SPACING (Phase 5)
   Apple HIG: generous radius, layered shadows, 8pt spacing grid.
   ============================================================ */

/* --- P1. Product Card Geometry --- */

/* Fix caption padding: 29px left → Apple 16px uniform */
.product-thumb .caption {
  padding: var(--space-4) var(--space-4) var(--space-3);
}

/* Align thumb bottom padding to 8pt grid */
.product-thumb {
  padding-bottom: var(--space-8);
}

/* Cart button group padding */
.product-thumb .cart-button {
  padding: var(--space-3) var(--space-4);
}

/* Rounded top corners on product image to match card radius */
.product-thumb .image {
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  overflow: hidden;
}

/* Product layout bottom gap on 8pt grid */
.product-layout {
  margin-bottom: var(--space-7);
}

/* --- P2. Navigation Spacing --- */

/* Reduce oversized nav padding: 32px/30px → 20px (Apple compact nav) */
.nav__primary .menu li {
  padding: var(--space-5) 0;
}

/* Thinner Apple-style nav separators */
.nav__primary .menu li {
  border-right-width: 0.5px;
}

.nav__primary .menu ul {
  border-width: 0.5px;
}

/* --- P3. Breadcrumb Spacing --- */

.breadcrumb {
  padding: var(--space-3) var(--space-5);
  margin: var(--space-4) 0;
}

/* --- P4. Footer Spacing --- */

footer > .container {
  padding-top: var(--space-9);
  padding-bottom: var(--space-7);
}

.copyright {
  padding: var(--space-4) 0;
}

/* --- P5. Border Refinements (Apple 0.5px separators) --- */

.panel-group .panel,
.panel {
  border-width: 0.5px;
}

/* Box-subcat: thinner border + radius */
.box-subcat li .image {
  border-width: 1px;
  border-radius: var(--radius-md);
}

/* Gallery slider nav buttons */
.bx-wrapper .bx-controls-direction a {
  border-radius: var(--radius-sm);
}

/* Quickview overlay icon */
.product-thumb .quickview:before {
  border-radius: var(--radius-xs);
}

/* --- P6. Table Cell Padding --- */

.table th,
.table td {
  padding: var(--space-3) var(--space-4);
}

/* --- P7. Misc Geometry Fixes --- */

/* Search results dropdown subtle border */
#livesearch_search_results {
  border-width: 0.5px;
}

/* Cart dropdown border */
.cart .dropdown-menu {
  border-width: 0.5px;
}

/* Header dropdowns border */
.header .dropdown-menu {
  border-width: 0.5px;
}

/* Box heading subtle shadow */
.box .box-heading h3 {
  box-shadow: var(--shadow-sm);
}

/* Well inner padding refinement — already var(--space-7), add margin-bottom */
.well + .well {
  margin-top: var(--space-5);
}

/* Account sidebar links padding */
.box.account ul a,
.box.affilate ul a {
  padding: var(--space-3) var(--space-4);
}

/* Alerts padding */
.alert {
  padding: var(--space-4) var(--space-5);
}

/* Product filter padding on 8pt grid */
.product-filter {
  padding: var(--space-5) 0;
}

/* Information page content padding */
.information-information {
  padding: var(--space-4) 0;
}

/* ============================================================
   Q. LIQUID GLASS EFFECTS (Phase 6)
   Fancybox modal glass, GPU hints, accessibility, mobile perf.
   ============================================================ */

/* Fancybox modal overlay — blur page behind modal */
.fancybox-overlay {
  background: rgba(0, 0, 0, 0.25) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Fancybox modal card — semi-transparent, no own blur (parent blurs) */
.fancybox-opened .fancybox-skin {
  background: rgba(255, 255, 255, 0.88) !important;
  border: 0.5px solid var(--apple-separator);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
}

/* GPU acceleration for persistent glass elements */
.isStuck,
.header .bg-line {
  transform: translateZ(0);
  will-change: backdrop-filter;
}

/* Accessibility: remove glass blur for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .header .bg-line,
  .isStuck,
  .header .dropdown-menu,
  .cart .dropdown-menu,
  .nav__primary .menu ul,
  #livesearch_search_results,
  .banners > div .s-desc span,
  .fancybox-overlay,
  .alert-success,
  .alert-danger,
  .alert-info,
  .alert-warning {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* Mobile performance: suppress blur layers below 735px */
@media (max-width: 735px) {
  .header .bg-line,
  .nav__primary .menu ul,
  #livesearch_search_results,
  .header .dropdown-menu {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--apple-bg-primary);
  }
}

/* ============================================================
   R. COMPONENT POLISH (Phase 7)
   Buttons, forms, product cards, pagination, etc.
   ============================================================ */

/* --- R1. Button States & Variants --- */

/* Pressed/active state — Apple tactile feedback */
.btn:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-sm);
  transition: transform 100ms ease;
}

/* Icon buttons (wishlist, compare, cart icons) */
.btn-icon {
  width: var(--touch-target-ios);
  height: var(--touch-target-ios);
  min-width: var(--touch-target-ios);
  padding: 0;
  border-radius: var(--radius-full);
  background: var(--apple-fill-tertiary);
  color: var(--apple-brand-blue);
  font-size: var(--text-body);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}
.btn-icon:hover {
  background: var(--apple-fill-secondary);
  color: var(--apple-brand-blue);
  box-shadow: none;
}
.btn-icon.mod1 {
  background: var(--apple-brand-blue);
  color: var(--apple-bg-primary);
}
.btn-icon.mod1:hover {
  background: var(--apple-brand-blue-hover);
}

/* Add-to-cart button — dominant CTA */
.btn-add, .product-btn-add {
  min-height: var(--touch-target-ios);
  font-weight: var(--fw-semibold);
  font-size: var(--text-body);
  letter-spacing: -0.01em;
  width: 100%;
}
#button-cart {
  min-height: 52px;
  font-size: var(--text-title3);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-lg);
}

/* Upload button (dashed file input) */
[id^="button-upload"] {
  border: 1.5px dashed var(--apple-separator-opaque);
  background: var(--apple-fill-quaternary);
  color: var(--apple-secondary-label);
  border-radius: var(--radius-input);
  min-height: var(--touch-target-ios);
}
[id^="button-upload"]:hover {
  border-color: var(--apple-brand-blue);
  background: var(--apple-blue-tint-light);
  color: var(--apple-brand-blue);
}

/* Datepicker / input-group button height */
.input-group-btn .btn {
  height: var(--touch-target-ios);
  padding: 0 var(--space-4);
  background: var(--apple-fill-tertiary);
  color: var(--apple-secondary-label);
  border-radius: 0 var(--radius-input) var(--radius-input) 0;
  border-left: 1px solid var(--apple-separator-opaque);
}
.input-group-btn .btn:hover {
  background: var(--apple-fill-secondary);
  color: var(--apple-brand-blue);
}

/* Block button */
.btn-block {
  width: 100%;
  display: block;
}

/* --- R2. Form Inputs --- */

/* Custom select chevron */
select.form-control, select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%238E8E93' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-8);
}

/* Custom radio buttons */
.radio input[type="radio"],
.product-options .radio input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--apple-gray2);
  border-radius: 50%;
  background: var(--apple-bg-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: var(--space-2);
}
.radio input[type="radio"]:checked,
.product-options .radio input[type="radio"]:checked {
  border-color: var(--apple-brand-blue);
  border-width: 5px;
}

/* Custom checkboxes */
.checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--apple-gray2);
  border-radius: 4px;
  background: var(--apple-bg-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: var(--space-2);
}
.checkbox input[type="checkbox"]:checked {
  background: var(--apple-brand-blue);
  border-color: var(--apple-brand-blue);
}
.checkbox input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid var(--apple-bg-primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Form group spacing */
.form-group {
  margin-bottom: var(--space-4);
}

/* Control label */
.control-label {
  font-family: var(--font-system);
  font-size: var(--text-footnote);
  font-weight: var(--fw-medium);
  color: var(--apple-secondary-label);
}

/* Help block */
.help-block {
  font-family: var(--font-system);
  font-size: var(--text-caption1);
  color: var(--apple-secondary-label);
  margin-top: var(--space-1);
}

/* Validation states */
.has-error .form-control {
  border-color: var(--apple-red);
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.15);
}
.has-error .control-label,
.has-error .help-block {
  color: var(--apple-red);
}
.has-success .form-control {
  border-color: var(--apple-green);
}

/* Input group addon height fix */
.input-group-addon {
  height: var(--touch-target-ios);
  display: flex;
  align-items: center;
  padding: 0 var(--space-3);
  font-size: var(--text-footnote);
}

/* --- R3. Product Card Polish --- */

/* Product name: bigger, bolder, primary color */
.product-thumb .name {
  font-size: var(--text-body);
  font-weight: var(--fw-medium);
  color: var(--apple-label);
  line-height: var(--lh-body);
  margin-bottom: var(--space-1);
}

/* Star ratings — filled orange, empty grey */
.rating .fa-stack .fa-star-o { color: var(--apple-gray4); }
.rating .fa-stack .fa-star   { color: var(--apple-orange); }

/* Sale/New badges — full Apple pill, not corner-tab */
.sale, .new_pr {
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-3);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
}
.new_pr {
  background: var(--apple-green);
}

/* Card hover — stronger lift + larger shadow */
.product-thumb {
  will-change: transform;
}

/* --- R4. Pagination (Segmented Control) --- */

.pagination {
  display: inline-flex;
  background: var(--apple-fill-tertiary);
  border-radius: var(--radius-md);
  padding: 2px;
  gap: 2px;
  border: none;
  list-style: none;
}
.pagination > li > a,
.pagination > li > span {
  border: none;
  background: transparent;
  border-radius: calc(var(--radius-md) - 2px);
  min-width: 36px;
  text-align: center;
  padding: var(--space-1) var(--space-3);
  margin-left: 0;
  float: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pagination > li:first-child > a,
.pagination > li:last-child > a,
.pagination > li:first-child > span,
.pagination > li:last-child > span {
  border: none;
  margin-left: 0;
}
.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover {
  background: var(--apple-bg-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
  color: var(--apple-label);
  border: none;
}
.pagination > li > a:hover {
  background: var(--apple-fill-secondary);
  border: none;
}

/* --- R5. Product Page Sections --- */

.product-section_title,
.review-form-title h3 {
  font-family: var(--font-system);
  font-size: var(--text-title3);
  font-weight: var(--fw-semibold);
  color: var(--apple-label);
  letter-spacing: var(--ls-tight);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-5);
  border-bottom: 0.5px solid var(--apple-separator-opaque);
}

.product-section {
  padding-top: var(--space-7);
  margin-bottom: var(--space-7);
}

/* Specification table — zebra + Apple header */
#tab-specification .table-bordered {
  border: none;
  border-radius: var(--radius-card);
  overflow: hidden;
}
#tab-specification .table-bordered tbody tr:nth-child(odd) td {
  background: var(--apple-fill-quaternary);
}
#tab-specification .table-bordered > tbody > tr > td {
  border-color: var(--apple-separator);
  padding: var(--space-3) var(--space-4);
}
#tab-specification .table-bordered > tbody > tr > th,
#tab-specification .table-bordered > thead > tr > th {
  background: var(--apple-bg-secondary);
  font-weight: var(--fw-semibold);
  color: var(--apple-secondary-label);
  font-size: var(--text-caption1);
  letter-spacing: 0.04em;
  border-color: var(--apple-separator-opaque);
}

/* Review items — Apple card style */
.product-reviews .review-item {
  background: var(--apple-bg-primary);
  border: 0.5px solid var(--apple-separator-opaque);
  border-radius: var(--radius-card);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
}

/* --- R6. Checkout Accordion --- */

.panel-heading {
  padding: var(--space-4) var(--space-5);
  background: var(--apple-bg-primary);
  border-bottom: 0.5px solid var(--apple-separator-opaque);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.panel-heading:hover {
  background: var(--apple-fill-quaternary);
}
.panel-heading .panel-title {
  font-family: var(--font-system);
  font-size: var(--text-body);
  font-weight: var(--fw-semibold);
  color: var(--apple-label);
  margin: 0;
}

/* Accordion caret animation */
.accordion-toggle .fa-caret-down {
  margin-left: var(--space-2);
  color: var(--apple-gray);
  transition: transform 0.25s ease;
}
.panel-heading.active .fa-caret-down,
[aria-expanded="true"] .fa-caret-down {
  transform: rotate(180deg);
}

/* Panel body padding */
.panel-body {
  padding: var(--space-5) var(--space-5) var(--space-6);
  background: var(--apple-bg-primary);
}

/* Panel group gap */
.panel-group .panel + .panel {
  margin-top: var(--space-2);
}

/* --- R7. Bootstrap Labels (tinted badges) --- */

.label {
  font-family: var(--font-system);
  font-size: var(--text-caption2);
  font-weight: var(--fw-medium);
  border-radius: var(--radius-full);
  padding: 2px var(--space-2);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.label-info {
  background: rgba(0, 122, 255, 0.12);
  color: var(--apple-brand-blue);
}
.label-success {
  background: rgba(52, 199, 89, 0.12);
  color: var(--apple-green);
}
.label-danger {
  background: rgba(255, 59, 48, 0.12);
  color: var(--apple-red);
}
.label-warning {
  background: rgba(255, 149, 0, 0.12);
  color: var(--apple-orange);
}
.label-default {
  background: var(--apple-fill-tertiary);
  color: var(--apple-secondary-label);
}

/* --- R8. Tooltips (dark glass) --- */

.tooltip .tooltip-inner {
  font-family: var(--font-system);
  font-size: var(--text-caption1);
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px) saturate(180%);
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  border-radius: var(--radius-xs);
  padding: var(--space-1) var(--space-3);
  color: #FFFFFF;
  max-width: 200px;
}
.tooltip.top .tooltip-arrow {
  border-top-color: rgba(0, 0, 0, 0.75);
}
.tooltip.bottom .tooltip-arrow {
  border-bottom-color: rgba(0, 0, 0, 0.75);
}
.tooltip.left .tooltip-arrow {
  border-left-color: rgba(0, 0, 0, 0.75);
}
.tooltip.right .tooltip-arrow {
  border-right-color: rgba(0, 0, 0, 0.75);
}

/* --- R9. Loading Spinner --- */

.fa-spin {
  color: var(--apple-brand-blue);
}

/* --- R10. Product Filter Selects --- */

.product-filter .control-label {
  font-size: var(--text-callout);
  font-weight: var(--fw-regular);
  color: var(--apple-secondary-label);
  margin-right: var(--space-2);
}
.product-filter .form-group {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0;
}

/* --- R11. Cart Quantity Input --- */

.cart-q, input.cart-q {
  width: 60px;
  min-width: 60px;
  text-align: center;
  height: var(--touch-target-ios);
}

/* ============================================================
   S. PHASE 8 — HEADER / NAV REDESIGN (Apple.com style)
   Makes the header a compact fixed glass bar: logo left,
   language selector right. Mobile: glass hamburger bar +
   Apple-style slide-out panel.
   ============================================================ */

/* S1. Header — fixed Apple glass bar */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9000;
  background: rgba(237, 242, 248, 0.82);
  backdrop-filter: saturate(200%) blur(24px);
  -webkit-backdrop-filter: saturate(200%) blur(24px);
  border-bottom: 0.5px solid var(--apple-border-glass);
  box-shadow:
    0 0.5px 0 rgba(0, 0, 0, 0.06),
    inset 0 -0.5px 0 rgba(255, 255, 255, 0.5);
  transform: translateZ(0);
  will-change: backdrop-filter;
}

/* S1b. Desktop Navigation Bar — Apple sub-nav glass */
.desktop-nav-bar {
  position: fixed;
  top: 96px;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 8990;
  background: rgba(237, 242, 248, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 0.5px solid var(--apple-border-glass);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateZ(0);
}
.desktop-nav-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}
.desktop-nav-menu li a {
  display: block;
  padding: 10px 18px;
  font-family: var(--font-system);
  font-size: 13px;
  font-weight: var(--fw-medium);
  color: var(--apple-secondary-label);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
  letter-spacing: -0.003em;
  white-space: nowrap;
}
.desktop-nav-menu li a:hover {
  color: var(--apple-brand-blue);
  background: rgba(0, 113, 227, 0.06);
}
.desktop-nav-menu li a:active {
  transform: scale(0.97);
}

/* Hide nav bar on mobile — swipe menu is used instead */
@media (max-width: 767px) {
  .desktop-nav-bar {
    display: none;
  }
}

/* S2. Push page content below fixed header + nav */
#page {
  padding-top: 136px;
}
@media (max-width: 767px) {
  #page {
    padding-top: 94px;
  }
}

/* S3. Container — flex row, compact */
.header .header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0;
  padding-bottom: 0;
  min-height: 96px;
  max-width: 1200px;
}

/* S4. Logo — full width for proper space-between effect */
.header .logo {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
}

.header .logo > a {
  display: flex;
  align-items: center;
  line-height: 1;
}

.header .logo img {
  height: 80px;
  width: auto;
  display: block;
}

/* S5. Language selector — right side, Apple micro style */
.header .logo .language-selector {
  text-align: left !important;
  margin-left: auto;
}

.header .logo .box-language .dropdown-toggle {
  font-family: var(--font-system);
  font-size: var(--text-caption1);
  font-weight: var(--fw-medium);
  color: var(--apple-secondary-label);
  letter-spacing: var(--ls-loose);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-xs);
  transition: var(--transition-fast);
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: none;
}

.header .logo .box-language .dropdown-toggle:hover {
  background: var(--apple-fill-quaternary);
  color: var(--apple-label);
}

/* Language dropdown — glass panel */
.header .logo .box-language .dropdown-menu {
  min-width: 120px;
  border-radius: var(--radius-menu);
  background: var(--apple-nav-glass);
  backdrop-filter: var(--glass-backdrop-standard);
  -webkit-backdrop-filter: var(--glass-backdrop-standard);
  border: 0.5px solid var(--apple-separator);
  box-shadow: var(--shadow-menu);
  padding: var(--space-1) 0;
}

.header .logo .box-language .dropdown-menu li a {
  font-size: var(--text-caption1);
  font-family: var(--font-system);
  color: var(--apple-label);
  padding: var(--space-2) var(--space-3);
  display: block;
  transition: var(--transition-fast);
}

.header .logo .box-language .dropdown-menu li a:hover {
  background: var(--apple-fill-quaternary);
  color: var(--apple-brand-blue);
}

/* S6. Mobile — glass hamburger bar + hide desktop header */
@media (max-width: 767px) {
  /* On mobile, toprow-1 is the primary nav bar */
  .toprow-1 {
    display: flex !important;
    align-items: center;
    height: 50px;
    background: var(--apple-nav-glass) !important;
    backdrop-filter: var(--glass-backdrop-standard) !important;
    -webkit-backdrop-filter: var(--glass-backdrop-standard) !important;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.12) !important;
    padding: 0 !important;
    width: 100%;
    z-index: 999999;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
  }

  .swipe-control {
    width: 50px;
    height: 50px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-right: 0.5px solid var(--apple-separator-opaque) !important;
    padding: 0 !important;
  }

  .swipe-control i {
    font-size: 20px;
    line-height: 1;
    color: var(--apple-label);
    transition: var(--transition-fast);
  }

  /* Desktop header becomes secondary on mobile — compact below toprow */
  .header {
    position: fixed;
    top: 50px;
    z-index: 8999;
    min-height: auto;
  }

  .header .header-container {
    min-height: 44px;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .header .logo img {
    height: 40px;
  }

  /* Push content below both bars (50px toprow + 44px header = 94px) */
  #page {
    padding-top: 94px;
  }

  .cart {
    z-index: 1000000;
  }
}

/* S7a. Swipe panel — must be above header (z-index 9000) */
.swipe {
  z-index: 9500;
}

/* S7. Swipe menu — Apple glass slide-out panel */
.swipe-menu {
  background: rgba(237, 242, 248, 0.92);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border-right: 0.5px solid var(--apple-border-glass);
  box-shadow: 8px 0 32px rgba(60, 90, 140, 0.12);
}

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

.swipe ul li a {
  background: transparent;
  color: var(--apple-label);
  border-top: 0.5px solid var(--apple-separator-opaque);
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-body);
  font-family: var(--font-system);
  font-weight: var(--fw-regular);
  transition: var(--transition-fast);
}

.swipe ul li a i,
.swipe ul li a:before {
  color: var(--apple-brand-blue);
  font-size: var(--text-body);
  margin-right: var(--space-3);
  width: 20px;
  text-align: center;
}

.swipe ul li a:hover {
  background: var(--apple-fill-quaternary);
  color: var(--apple-brand-blue);
}

/* Secondary/footer links in swipe menu */
.swipe .foot li a {
  font-size: var(--text-footnote);
  color: var(--apple-secondary-label);
  padding: var(--space-2) var(--space-5);
}

.swipe .foot li a:hover {
  color: var(--apple-brand-blue);
}

/* Shadow overlay when menu is open */
.shadow {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* S8. Responsive — tablet */
@media (min-width: 768px) and (max-width: 991px) {
  .header .logo img {
    height: 60px;
  }
  .header .header-container {
    min-height: 76px;
  }
  .desktop-nav-bar {
    top: 76px;
  }
  .desktop-nav-menu li a {
    padding: 8px 14px;
    font-size: 12px;
  }
  #page {
    padding-top: 116px;
  }
}

/* S9. Large desktop */
@media (min-width: 1200px) {
  .header .logo img {
    height: 90px;
  }
  .header .header-container {
    min-height: 110px;
  }
  .desktop-nav-bar {
    top: 110px;
  }
  .desktop-nav-menu li a {
    padding: 12px 22px;
    font-size: 14px;
  }
  #page {
    padding-top: 150px;
  }
}

/* S10. Reduced motion — header */
@media (prefers-reduced-motion: reduce) {
  .header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: var(--apple-bg-primary) !important;
  }
}

/* ============================================================
   END OF APPLE-OVERRIDE.CSS (Catalog)
   ============================================================ */
