/**
 * -----------------------------------------
 * SAYR WATCHES
 * Budget Responsive Breakpoints Stylesheet
 *
 * Responsibility:
 * Media query breakpoint configurations for hero height scaling
 * and mobile/tablet sizing adjustments.
 *
 * Dependencies:
 * budget/css/budget.css, budget/css/budget-components.css
 *
 * Ownership Boundary:
 * Budget Storefront (Responsive Layout overrides)
 * -----------------------------------------
 */

/* ── Laptop (≤1366px) ── */
@media (max-width: 1366px) {
  #hero {
    min-height: 75svh;
    padding: 80px 20px 60px;
  }
}

/* ── Tablet (≤768px) ── */
@media (max-width: 768px) {
  #hero {
    min-height: 80svh;
    padding: 60px 16px 54px;
  }
  #basic-main #hero .hero-ornament {
    transform: translateY(-13px);
  }
  #basic-main #hero .hero-title,
  #basic-main #hero.loaded .hero-title {
    font-size: 2.5rem;
    transform: translateY(-13px);
  }
  #basic-main #hero .hero-ctas {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 340px;
    margin: 48px auto 0;
  }
  #basic-main #hero .hero-ctas .btn-primary,
  #basic-main #hero .hero-ctas .btn-ghost {
    width: 100%;
    height: 50px;
    border-radius: 8px;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
  }
  .b-catalog-section {
    padding: 40px 14px 44px;
  }
  .b-catalog-header {
    margin-bottom: 28px;
  }
  .b-catalog-title {
    font-size: 1.85rem;
    margin: 8px 0;
  }
  #basicFilterBar {
    padding: 14px 16px;
    border-radius: 8px;
    margin-top: 28px;
    margin-bottom: 28px;
    gap: 10px;
  }
  #basic-main #productGrid {
    gap: 14px;
    padding: 0 2px;
  }
  #basic-main .pc-body {
    padding: 13px 12px 14px;
  }
  #basic-main .pc-name {
    font-size: 0.83rem;
    line-height: 1.25;
    min-height: calc(1.25em * 2);
    margin-bottom: 4px;
  }
  #basic-main .pc-collection {
    font-size: 0.52rem;
    margin-bottom: 3px;
  }
  #basic-main .pc-movement {
    font-size: 0.58rem;
    margin-bottom: 8px;
  }
  #basic-main .pc-price {
    font-size: 1.1rem;
  }
  #basic-main .pc-btn-cart {
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    margin: 0;
    font-size: 0.69rem;
  }
  #basic-main .pc-btn-wa-icon {
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    width: 38px;
    min-width: 38px;
    max-width: 38px;
    margin: 0;
  }
}

/* ── Mobile (≤480px) ── */
@media (max-width: 480px) {
  #hero {
    min-height: 84svh;
    padding: 48px 14px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: visible;
  }
  #hero .b-hero-ann-bar {
    height: 36px;
    padding: 0 44px;
  }
  #hero .b-hero-ann-bar .announcement-bar-text {
    font-size: 0.64rem;
  }
  #basic-main #hero .hero-ornament {
    transform: translateY(-17px);
  }
  #basic-main #hero .hero-title,
  #basic-main #hero.loaded .hero-title {
    font-size: 2.1rem;
    line-height: 1.15;
    margin-bottom: 0;
    transform: translateY(-17px);
  }
  #basic-main #hero .hero-ctas {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 320px;
    margin: 52px auto 0;
  }
  #basic-main #hero .hero-ctas .btn-primary,
  #basic-main #hero .hero-ctas .btn-ghost {
    flex: none;
    width: 100%;
    max-width: 100%;
    height: 48px;
    padding: 0 16px;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-align: center;
    white-space: nowrap;
    box-sizing: border-box;
  }
  .b-catalog-section {
    padding: 36px 10px 36px;
  }
  .b-catalog-header {
    margin-bottom: 24px;
  }
  .b-catalog-header .t-label {
    font-size: 0.62rem;
    letter-spacing: 0.18em;
  }
  .b-catalog-title {
    font-size: 1.55rem;
    margin: 6px 0;
  }
  .b-gold-line-center {
    width: 40px;
  }
  #basic-main #productGrid {
    gap: 10px;
    padding: 0;
  }
  #basic-main .pc-image-wrap {
    aspect-ratio: 1 / 1;
    overflow: hidden;
  }
  #basic-main .pc-img-main,
  #basic-main .pc-img-hover {
    object-fit: contain;
    object-position: center center;
    padding: 0;
    transform: scale(1.28) translateZ(0);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: high-quality;
    backface-visibility: hidden;
  }
  #basic-main .product-card:active .pc-img-main,
  #basic-main .product-card:hover .pc-img-main {
    transform: scale(1.32) translateZ(0);
  }
  #basic-main .pc-body {
    padding: 11px 9px 13px;
  }
  #basic-main .pc-name {
    font-size: 0.8rem;
    line-height: 1.25;
    min-height: calc(1.25em * 2);
    margin-bottom: 3px;
  }
  #basic-main .pc-collection {
    font-size: 0.5rem;
    margin-bottom: 2px;
  }
  #basic-main .pc-movement {
    font-size: 0.56rem;
    margin-bottom: 6px;
  }
  #basic-main .pc-price {
    font-size: 1.05rem;
  }
  #basic-main .pc-btn-cart {
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    margin: 0;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
  }
  #basic-main .pc-btn-wa-icon {
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    margin: 0;
    font-size: 0.95rem;
  }
  /* ── Mobile Filter Row (≤480px) ── */
  #basicFilterBar {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    margin-top: 18px;
    margin-bottom: 22px;
    top: 8px;
  }
  .b-desktop-filters {
    display: none;
  }
  .b-mobile-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
  }
  .b-mobile-search-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
  }
  .b-mobile-search-input {
    width: 100%;
    height: 44px;
    background: #FAF8F5;
    border: 1px solid rgba(200, 164, 93, 0.45);
    border-radius: 8px;
    padding: 0 14px 0 38px;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px; /* Prevents iOS auto-zoom */
    color: #0F3558;
    box-shadow: 0 4px 14px rgba(15, 53, 88, 0.08);
    box-sizing: border-box;
  }
  .b-mobile-search-input:focus {
    outline: none;
    border-color: #C8A45D;
    box-shadow: 0 0 0 2px rgba(200, 164, 93, 0.25);
  }
  .b-mobile-search-input::placeholder {
    color: rgba(15, 53, 88, 0.5);
    font-size: 0.8rem;
  }
  .b-mobile-search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    color: #0F3558;
    opacity: 0.65;
    pointer-events: none;
  }
  .b-mobile-filter-btn {
    height: 44px;
    padding: 0 16px;
    background: #0F3558;
    color: #FAF8F5;
    border: 1px solid rgba(200, 164, 93, 0.45);
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(15, 53, 88, 0.12);
    transition: all 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .b-mobile-filter-btn:active {
    transform: scale(0.97);
  }
  .b-filter-badge {
    display: none;
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #C8A45D;
    border: 1.5px solid #0F3558;
  }
  .b-filter-badge.active {
    display: block;
  }

  /* Drawer Scrim */
  .b-drawer-scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 53, 88, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  .b-drawer-scrim.active {
    display: block;
    opacity: 1;
  }

  /* Drawer Bottom Sheet */
  .b-drawer {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: #FAF8F5;
    border-top: 1px solid rgba(200, 164, 93, 0.45);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -10px 40px rgba(15, 53, 88, 0.28);
    transform: translateY(105%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 85vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 12px));
    box-sizing: border-box;
  }
  .b-drawer.active {
    transform: translateY(0);
  }
  .b-drawer-handle {
    width: 38px;
    height: 4px;
    background: rgba(15, 53, 88, 0.2);
    border-radius: 2px;
    margin: 12px auto 0;
  }
  .b-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 12px;
    border-bottom: 1px solid rgba(200, 164, 93, 0.22);
  }
  .b-drawer-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.05rem;
    color: #0F3558;
  }
  .b-drawer-close {
    background: rgba(15, 53, 88, 0.06);
    border: 1px solid rgba(200, 164, 93, 0.35);
    color: #0F3558;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
  }
  .b-drawer-body {
    padding: 18px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .b-drawer-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #C8A45D;
    margin: 0 0 10px 0;
  }
  .b-drawer-grid {
    display: grid;
    gap: 8px;
  }
  .b-drawer-grid-2 { grid-template-columns: 1fr 1fr; }
  .b-drawer-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

  .b-drawer-opt {
    height: 42px;
    border-radius: 8px;
    border: 1px solid rgba(15, 53, 88, 0.18);
    background: #FFFFFF;
    color: #0F3558;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.74rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .b-drawer-opt.active {
    background: #0F3558;
    color: #FAF8F5;
    border-color: #0F3558;
    font-weight: 600;
  }
  .b-drawer-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
  }
  .b-drawer-clear-btn {
    flex: 1;
    height: 44px;
    border-radius: 8px;
    border: 1px solid rgba(15, 53, 88, 0.25);
    background: transparent;
    color: #0F3558;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
  }
  .b-drawer-apply-btn {
    flex: 2;
    height: 44px;
    border-radius: 8px;
    border: none;
    background: #0F3558;
    color: #FAF8F5;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(15, 53, 88, 0.2);
  }
}
