/* ==========================================================================
   RESPONSIVE DESIGN BREAKPOINTS — BARAM LUXURY SPECIFICATION
   Tested at: 1920px, 1600px, 1440px, 1280px, 1024px, 820px, 768px, 480px, 375px, 320px
   ========================================================================== */

/* --------------------------------------------------------------------------
   DESKTOP LARGE & EXTRA LARGE (1440px - 1920px)
   -------------------------------------------------------------------------- */
@media (min-width: 1440px) {
  :root {
    --container-pad: 48px;
  }
}

/* --------------------------------------------------------------------------
   LAPTOPS & LANDSCAPE TABLETS (1024px - 1279px)
   -------------------------------------------------------------------------- */
@media (max-width: 1279px) {
  .products-grid,
  .search-results-grid,
  .lv-search-results-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .lv-search-grid-6,
  .lv-search-grid-5 {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mega-menu-body {
    grid-template-columns: 240px 1fr;
  }

  .mega-featured-column {
    display: none;
  }

  .pdp-grid,
  .pdp-page-grid {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
  }

  .pdp-gallery-wrap,
  .pdp-page-gallery {
    width: 100%;
    min-width: 0;
  }

  .pdp-details-wrap,
  .pdp-page-info {
    width: 100%;
    min-width: 0;
  }
}

/* --------------------------------------------------------------------------
   TABLETS & MEDIUM SCREENS (768px - 1023px)
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  :root {
    --header-h: 66px;
    --container-pad: 24px;
  }

  .products-grid,
  .search-results-grid,
  .lv-search-results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lv-search-grid-6,
  .lv-search-grid-5 {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }

  .editorial-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .stores-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer-nav-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }

  .mega-menu-body {
    grid-template-columns: 1fr;
    padding: var(--space-xl) var(--container-pad);
  }

  .mega-category-tabs {
    border-right: none;
    border-bottom: 1px solid var(--lv-gray-200);
    padding-right: 0;
    padding-bottom: var(--space-lg);
    flex-direction: row;
    overflow-x: auto;
  }

  .mega-tab-btn {
    white-space: nowrap;
  }
}

/* --------------------------------------------------------------------------
   MOBILE SCREENS (320px - 767px)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  :root {
    --header-h: 60px;
    --header-banner-h: 32px;
    --container-pad: 16px;
  }

  /* Header adjustments — mobile: logo left, icons right */
  .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0;
  }

  /* Hide the + Contact Us section on mobile */
  .header-left {
    display: none;
  }

  /* Logo moves to the far left */
  .header-center {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-width: 0;
  }

  .brand-logo {
    font-size: clamp(0.95rem, 4vw, 1.25rem);
    letter-spacing: var(--ls-wide);
  }

  .brand-logo-img {
    height: 22px;
    max-width: 140px;
  }

  /* Right icons group */
  .header-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }

  /* All icon buttons same size */
  .header-icon-action,
  .header-nav-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Hide ONLY direct text labels — NOT the hamburger bar spans */
  .header-nav-btn > span {
    display: none;
  }

  /* Ensure hamburger icon stays visible and correct */
  .header-hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 18px;
    height: 13px;
  }

  .header-hamburger-icon span {
    display: block;
    height: 1.5px;
    width: 100%;
    background-color: currentColor;
  }

  /* Mega menu — full width on mobile with zero horizontal overflow */
  .mega-menu-drawer {
    width: 100%;
    max-width: 100%;
  }

  .mega-menu-body {
    grid-template-columns: 1fr;
    padding: var(--space-xl) var(--container-pad);
    gap: var(--space-xl);
  }

  .mega-category-tabs {
    border-right: none;
    border-bottom: 1px solid var(--lv-gray-100);
    flex-direction: column;
    padding-right: 0;
    padding-bottom: var(--space-md);
    gap: var(--space-xs);
  }

  .mega-tab-btn {
    font-size: var(--text-base);
    padding: var(--space-xs) 0;
  }

  .mega-featured-column {
    display: none;
  }

  /* LV Search — Mobile Responsive */
  .lv-search-topbar {
    padding: 16px 20px 10px;
  }

  .lv-search-logo {
    font-size: 1.15rem;
    letter-spacing: 0.18em;
  }

  .lv-search-bar-wrap {
    padding: 0 16px;
    margin-top: 4px;
  }

  .lv-search-capsule {
    height: 44px;
    padding: 0 16px;
  }

  .lv-trending-searches {
    gap: 8px 8px;
    margin: 14px 0 24px;
    padding: 0 16px;
    justify-content: flex-start;
    width: 100%;
  }

  .lv-trending-label {
    width: 100%;
    margin-bottom: 4px;
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .lv-trending-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 8px;
    width: 100%;
  }

  .lv-trending-link {
    padding: 6px 14px;
    font-size: 0.76rem;
  }

  .lv-search-content-area {
    padding: 0 16px 40px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .lv-search-grid-6,
  .lv-search-grid-5,
  .lv-search-results-grid,
  .search-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 10px;
    width: 100%;
    min-width: 0;
  }

  .lv-search-section {
    margin-bottom: 32px;
  }

  .lv-search-section-title {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  /* Hero Section */
  .hero-slider-section {
    height: 85vh;
    min-height: 520px;
  }

  .hero-slide {
    padding-bottom: 74px;
  }

  .hero-slide-title {
    font-size: clamp(1.75rem, 6.5vw, 2.5rem);
    margin-bottom: var(--space-xs);
  }

  .hero-controls-bar {
    bottom: 16px;
    padding: 0 16px;
  }

  .hero-campaign {
    min-height: 80vh;
  }

  .hero-content {
    padding-bottom: var(--space-2xl);
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  /* Catalog */
  .catalog-tabs-bar {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: var(--space-xs);
  }

  .catalog-action-bar {
    flex-direction: row;
    align-items: center;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .product-card-quick-actions {
    display: none; /* Hide hover overlay on mobile touch */
  }

  .product-card-title {
    font-size: var(--text-xs);
  }

  .product-card-material {
    display: none;
  }

  .product-card-price {
    font-size: var(--text-sm);
  }

  /* Drawers */
  .cart-drawer,
  .wishlist-drawer,
  .filter-drawer {
    width: 100%;
    max-width: 100%;
  }

  .cart-item-card,
  .wishlist-item-card {
    grid-template-columns: 75px 1fr;
    gap: var(--space-sm);
  }

  .cart-item-thumb,
  .wishlist-item-thumb {
    width: 75px;
    height: 75px;
  }

  /* PDP Modal */
  .pdp-modal {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .pdp-gallery-wrap,
  .pdp-details-wrap {
    padding: var(--space-md);
  }

  .pdp-actions-row {
    grid-template-columns: 1fr;
  }

  .pdp-recs-grid {
    grid-template-columns: 1fr;
  }

  /* Standalone PDP Page Mobile Refinements */
  .pdp-page-section {
    padding-top: calc(var(--header-h, 60px) + 14px);
    padding-bottom: 36px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .pdp-page-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 20px;
    overflow: hidden;
  }

  .pdp-page-gallery {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .pdp-gallery-stacked-list {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding-bottom: 6px;
    scrollbar-width: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .pdp-gallery-row-item {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    scroll-snap-align: center;
    aspect-ratio: 3 / 4;
    min-height: 0;
    height: auto;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
  }

  .pdp-page-info {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-right: 0;
    box-sizing: border-box;
  }

  .pdp-page-title {
    font-size: clamp(1.3rem, 5.5vw, 1.7rem);
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.25;
    margin-bottom: 8px;
    max-width: 100%;
  }

  .pdp-page-price {
    font-size: clamp(1.2rem, 5vw, 1.45rem);
    margin-bottom: 16px;
    padding-bottom: 10px;
  }

  .pdp-page-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    margin-bottom: 14px;
  }

  .pdp-page-actions .btn {
    flex: 1;
    min-width: 0;
    padding: 14px 10px;
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .pdp-page-actions .btn span {
    white-space: normal;
    word-break: break-word;
    text-align: center;
  }

  #pdpPageWishlistBtn {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
  }

  .pdp-page-secondary-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
  }

  .pdp-page-secondary-actions .btn {
    width: 100%;
    min-width: 0;
    padding: 13px 12px;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
  }

  .pdp-page-secondary-actions .btn span {
    white-space: normal;
    word-break: break-word;
  }

  .pdp-service-highlights {
    width: 100%;
    max-width: 100%;
    padding: 14px 16px;
    margin-bottom: 22px;
    gap: 10px;
    box-sizing: border-box;
  }

  .pdp-service-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.72rem;
    line-height: 1.4;
    width: 100%;
    min-width: 0;
  }

  .pdp-service-item span {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* Store locator */
  .store-tabs-bar {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .store-tab-btn {
    white-space: nowrap;
  }

  .store-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  /* Footer */
  .footer-nav-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .newsletter-form {
    flex-direction: column;
  }

  .footer-bottom-bar {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   SMALL MOBILE PHONES (320px - 360px)
   -------------------------------------------------------------------------- */
@media (max-width: 360px) {
  :root {
    --container-pad: 10px;
  }

  .header-right [data-open-country] {
    display: none;
  }

  .header-icon-action {
    width: 28px;
    height: 28px;
  }

  .brand-logo {
    font-size: 0.9rem;
    letter-spacing: 0.08em;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }
}
