/*
 * Our Theme Pro 1.0.0
 * Performance-first visual layer for PrestaShop 9.1 / Hummingbird 2.0.
 * This file intentionally avoids external fonts, icon fonts, heavy effects and JS-dependent layout.
 */
@layer ourtheme.tokens, ourtheme.base, ourtheme.layout, ourtheme.components, ourtheme.mobile, ourtheme.utilities;

@layer ourtheme.tokens {
  :root {
    color-scheme: light;
    --oc-font-sans: Poppins, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --oc-font-size: 16px;
    --oc-line: 1.5;
    --oc-bg: #ffffff;
    --oc-surface: #ffffff;
    --oc-surface-2: #fff7f9;
    --oc-text: #17181a;
    --oc-muted: #64676d;
    --oc-border: #eadfe3;
    --oc-primary: #87001f;
    --oc-primary-contrast: #ffffff;
    --oc-accent: #87001f;
    --oc-success: #197a46;
    --oc-danger: #b42318;
    --oc-radius-sm: .5rem;
    --oc-radius: 1rem;
    --oc-radius-lg: 1rem;
    --oc-shadow-sm: 0 1px 2px rgb(0 0 0 / .05);
    --oc-shadow: 0 12px 35px rgb(0 0 0 / .07);
    --oc-container: 1440px;
    --oc-gutter: clamp(1rem, 2.2vw, 2rem);
    --oc-space-1: .25rem;
    --oc-space-2: .5rem;
    --oc-space-3: .75rem;
    --oc-space-4: 1rem;
    --oc-space-5: 1.5rem;
    --oc-space-6: 2rem;
    --oc-space-7: 3rem;
    --oc-space-8: 4rem;
    --oc-control-height: 2.75rem;
    --oc-header-height: 4.5rem;
    --oc-motion: 180ms;
  }
}

@layer ourtheme.base {
  html {
    font-family: var(--oc-font-sans);
    font-size: var(--oc-font-size);
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-text-size-adjust: 100%;
  }

  body {
    margin: 0;
    background: var(--oc-bg);
    color: var(--oc-text);
    font-family: var(--oc-font-sans);
    line-height: var(--oc-line);
    overflow-wrap: break-word;
  }

  img,
  picture,
  video,
  svg {
    max-width: 100%;
  }

  img {
    height: auto;
  }

  a {
    color: inherit;
    text-underline-offset: .18em;
  }

  :where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid color-mix(in srgb, var(--oc-accent) 70%, white);
    outline-offset: 3px;
  }

  ::selection {
    background: color-mix(in srgb, var(--oc-accent) 28%, transparent);
  }

  h1, h2, h3, h4, h5, h6 {
    color: var(--oc-text);
    font-family: var(--oc-font-sans);
    font-weight: 650;
    letter-spacing: -.02em;
    line-height: 1.18;
    text-wrap: balance;
  }

  p, li, dd, dt, label, input, button, select, textarea {
    font-family: var(--oc-font-sans);
  }

  .visually-hidden-focusable:not(:focus):not(:focus-within) {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
}

@layer ourtheme.layout {
  .container,
  .container-fluid,
  .ourtheme-container,
  #wrapper > .container {
    width: min(100% - (2 * var(--oc-gutter)), var(--oc-container));
    margin-inline: auto;
  }

  #wrapper {
    background: var(--oc-bg);
    padding-block: clamp(1rem, 2vw, 2rem) var(--oc-space-7);
  }

  #content-wrapper {
    min-width: 0;
  }

  #left-column,
  #right-column {
    min-width: 0;
  }

  .ourtheme-section,
  [data-ourbuilder-section] {
    position: relative;
    width: 100%;
  }

  [data-ourbuilder-container] {
    width: min(100% - (2 * var(--oc-gutter)), var(--oc-container));
    margin-inline: auto;
  }

  [data-ourbuilder-grid] {
    display: grid;
    gap: var(--oc-space-5);
  }

  @supports (content-visibility: auto) {
    [data-ourbuilder-defer="true"] {
      content-visibility: auto;
      contain-intrinsic-size: auto 600px;
    }
  }
}

@layer ourtheme.components {
  /* Header / navigation */
  #header {
    position: relative;
    z-index: 50;
    background: color-mix(in srgb, var(--oc-surface) 96%, transparent);
    border-bottom: 1px solid var(--oc-border);
  }

  #header .header-top,
  #header .header-nav {
    background: transparent;
  }

  @media (min-width: 992px) {
    html[data-oc-sticky-header="true"] #header {
      position: sticky;
      top: 0;
      backdrop-filter: saturate(140%) blur(10px);
    }
  }

  /* Buttons */
  .btn,
  button,
  input[type="submit"] {
    min-height: var(--oc-control-height);
    border-radius: var(--oc-radius-sm);
    font-weight: 600;
    transition: transform var(--oc-motion) ease, box-shadow var(--oc-motion) ease, background-color var(--oc-motion) ease, border-color var(--oc-motion) ease;
  }

  .btn-primary,
  .add-to-cart,
  button[type="submit"].btn-primary {
    background: var(--oc-primary);
    border-color: var(--oc-primary);
    color: var(--oc-primary-contrast);
  }

  .btn-primary:hover,
  .add-to-cart:hover,
  button[type="submit"].btn-primary:hover {
    background: color-mix(in srgb, var(--oc-primary) 88%, white);
    border-color: color-mix(in srgb, var(--oc-primary) 88%, white);
    color: var(--oc-primary-contrast);
  }

  @media (hover: hover) and (pointer: fine) {
    .btn:not(:disabled):hover,
    button:not(:disabled):hover {
      transform: translateY(-1px);
    }
  }

  /* Forms */
  .form-control,
  .form-select,
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  select,
  textarea {
    min-height: var(--oc-control-height);
    border: 1px solid var(--oc-border);
    border-radius: var(--oc-radius-sm);
    background: var(--oc-surface);
    color: var(--oc-text);
  }

  textarea {
    min-height: 8rem;
  }

  .form-control:focus,
  .form-select:focus,
  input:focus,
  select:focus,
  textarea:focus {
    border-color: var(--oc-accent);
    box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--oc-accent) 18%, transparent);
  }

  /* Cards / generic blocks */
  .card,
  .block,
  .featured-products,
  .product-accessories,
  .product-miniature,
  .js-product-miniature {
    border-color: var(--oc-border);
    border-radius: var(--oc-radius);
  }

  /* Product listing */
  .products,
  .product-list {
    --oc-products-gap: clamp(.75rem, 1.5vw, 1.35rem);
  }

  .products .product,
  .product-miniature,
  .js-product-miniature {
    min-width: 0;
  }

  .product-miniature .thumbnail-container,
  .js-product-miniature .thumbnail-container {
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--oc-border);
    border-radius: var(--oc-radius);
    background: var(--oc-surface);
    box-shadow: none;
    transition: border-color var(--oc-motion) ease, box-shadow var(--oc-motion) ease, transform var(--oc-motion) ease;
  }

  @media (hover: hover) and (pointer: fine) {
    .product-miniature .thumbnail-container:hover,
    .js-product-miniature .thumbnail-container:hover {
      border-color: color-mix(in srgb, var(--oc-border) 58%, var(--oc-text));
      box-shadow: var(--oc-shadow-sm);
      transform: translateY(-2px);
    }
  }

  .product-miniature img,
  .js-product-miniature img {
    object-fit: contain;
  }

  .product-miniature .product-title,
  .js-product-miniature .product-title {
    color: var(--oc-text);
    font-weight: 560;
    line-height: 1.35;
  }

  .product-miniature .product-price-and-shipping,
  .js-product-miniature .product-price-and-shipping,
  .current-price {
    color: var(--oc-text);
    font-weight: 700;
  }

  .product-flag,
  .discount-percentage,
  .discount-amount {
    border-radius: 999px;
  }

  /* Product page */
  .product-container,
  .product-information,
  .product-cover,
  .product-images {
    min-width: 0;
  }

  .product-cover img {
    border: 1px solid var(--oc-border);
    border-radius: var(--oc-radius-lg);
    background: var(--oc-surface);
  }

  .product-information .product-prices {
    margin-block: var(--oc-space-4);
  }

  .product-actions {
    border-top: 1px solid var(--oc-border);
    padding-top: var(--oc-space-5);
  }

  /* Category / listing */
  #subcategories,
  .block-category {
    border-radius: var(--oc-radius-lg);
  }

  .block-category {
    border: 1px solid var(--oc-border);
    background: var(--oc-surface);
  }

  /* Breadcrumbs */
  .breadcrumb {
    font-size: .875rem;
    color: var(--oc-muted);
  }

  /* Checkout */
  body#checkout #wrapper,
  body#cart #wrapper {
    background: var(--oc-surface-2);
  }

  body#checkout .checkout-step,
  body#cart .cart-overview,
  body#cart .cart-summary,
  .card-block {
    border: 1px solid var(--oc-border);
    border-radius: var(--oc-radius);
    background: var(--oc-surface);
    box-shadow: none;
  }

  body#checkout .checkout-step.-current {
    border-color: color-mix(in srgb, var(--oc-accent) 45%, var(--oc-border));
  }

  /* Alerts */
  .alert {
    border-radius: var(--oc-radius-sm);
  }

  /* Footer */
  #footer {
    border-top: 1px solid var(--oc-border);
    background: var(--oc-surface-2);
  }

  #footer a {
    text-decoration-thickness: 1px;
  }

  /* Builder semantic primitives */
  .oc-stack {
    display: flex;
    flex-direction: column;
    gap: var(--oc-stack-gap, var(--oc-space-4));
  }

  .oc-cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--oc-cluster-gap, var(--oc-space-3));
  }

  .oc-grid {
    display: grid;
    grid-template-columns: repeat(var(--oc-columns, 4), minmax(0, 1fr));
    gap: var(--oc-grid-gap, var(--oc-space-5));
  }

  .oc-surface {
    background: var(--oc-surface);
    border: 1px solid var(--oc-border);
    border-radius: var(--oc-radius);
  }
}

@layer ourtheme.mobile {
  /* Mobile is a profile, not a duplicate page. Builder may override these variables. */
  @media (max-width: 991.98px) {
    :root {
      --oc-gutter: clamp(.875rem, 4vw, 1.25rem);
      --oc-space-7: 2.25rem;
      --oc-space-8: 3rem;
      --oc-control-height: 2.875rem;
      --oc-header-height: 4rem;
    }

    html {
      scroll-padding-top: .75rem;
    }

    #wrapper {
      padding-top: var(--oc-space-4);
      padding-bottom: calc(var(--oc-space-7) + env(safe-area-inset-bottom));
    }

    #header {
      position: sticky;
      top: 0;
      backdrop-filter: saturate(140%) blur(10px);
    }

    .oc-grid {
      grid-template-columns: repeat(var(--oc-columns-mobile, 2), minmax(0, 1fr));
      gap: var(--oc-grid-gap-mobile, .875rem);
    }

    .products.row,
    .product-list.row {
      --bs-gutter-x: .875rem;
      --bs-gutter-y: 1rem;
    }

    .product-miniature .thumbnail-container,
    .js-product-miniature .thumbnail-container {
      border-radius: .75rem;
    }

    .product-miniature .product-title,
    .js-product-miniature .product-title {
      font-size: .9rem;
    }

    .product-miniature .product-price-and-shipping,
    .js-product-miniature .product-price-and-shipping {
      font-size: .95rem;
    }

    .btn,
    button,
    input[type="submit"] {
      min-height: 2.875rem;
    }

    body#product .product-actions .add-to-cart {
      min-height: 3rem;
    }

    body#checkout .checkout-step,
    body#cart .cart-overview,
    body#cart .cart-summary,
    .card-block {
      border-radius: .75rem;
    }
  }

  @media (max-width: 575.98px) {
    h1 { font-size: clamp(1.7rem, 8vw, 2.25rem); }
    h2 { font-size: clamp(1.35rem, 6vw, 1.8rem); }

    .container,
    .container-fluid,
    .ourtheme-container,
    #wrapper > .container,
    [data-ourbuilder-container] {
      width: min(100% - (2 * var(--oc-gutter)), var(--oc-container));
    }

    .oc-grid {
      --oc-columns-mobile: 2;
    }
  }
}

@layer ourtheme.utilities {
  .oc-desktop-only { display: initial; }
  .oc-mobile-only { display: none !important; }

  @media (max-width: 991.98px) {
    .oc-desktop-only { display: none !important; }
    .oc-mobile-only { display: initial !important; }
  }

  .oc-no-motion,
  .oc-no-motion * {
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      scroll-behavior: auto !important;
      animation-duration: .01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: .01ms !important;
    }
  }

  @media (prefers-contrast: more) {
    :root {
      --oc-border: #8a8a8a;
    }
  }

  @media print {
    #header,
    #footer,
    .no-print,
    .btn,
    button {
      display: none !important;
    }
    body {
      background: #fff !important;
      color: #000 !important;
    }
  }
}

@layer ourtheme.components {
  .ourtheme-mobile-bar {
    position: fixed;
    z-index: 1040;
    right: 0;
    bottom: 0;
    left: 0;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--oc-border);
    background: color-mix(in srgb, var(--oc-surface) 96%, transparent);
    box-shadow: 0 -8px 24px rgb(0 0 0 / .07);
    backdrop-filter: saturate(140%) blur(10px);
  }
}

/* ==========================================================
   Our Theme Pro v2.0 — integration layer
   ========================================================== */
.ourtheme-builder-header,.ourtheme-builder-footer{width:100%;position:relative;z-index:10}.ourtheme-builder-header .ourbuilder-render,.ourtheme-builder-footer .ourbuilder-render{max-width:none}.ourtheme-mobile-bar{display:none}.ots-sticky-buy-mobile{position:fixed!important;left:12px;right:12px;bottom:12px;z-index:10050;width:auto!important;box-shadow:0 8px 30px rgba(0,0,0,.18)}
@media(max-width:767.98px){.ourtheme-mobile-bar{display:block;position:fixed;left:0;right:0;bottom:0;z-index:10040;background:var(--ots-surface,#fff);box-shadow:0 -4px 20px rgba(0,0,0,.12)}body:has(.ourtheme-mobile-bar .ourbuilder-render){padding-bottom:72px}.ourtheme-builder-header .ob-trust-bar{grid-template-columns:repeat(2,1fr)}}
