/* ===========================================================
   Mobile refinements — loaded last so it overrides base rules
   =========================================================== */

@media (max-width: 1024px) {
  /* Mobile nav drawer */
  .mobile-nav {
    padding: 8px 0 16px;
  }

  .mobile-nav a {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 12px 4px;
    font-size: 0.9375rem;
  }

  .mobile-nav .mobile-search {
    display: flex;
    width: 100%;
    height: 44px;
    margin: 10px 0 14px;
    padding: 0 14px;
  }

  .mobile-nav .mobile-search input {
    font-size: 1rem;
  }

  .mobile-nav .mobile-search button {
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 6px 0 4px;
  }

  .mobile-auth-row a {
    justify-content: center;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 500;
    padding: 12px 8px;
  }

  .mobile-auth-row a:hover {
    padding-left: 8px;
    border-color: var(--gold-light);
  }

  .hamburger {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .icon-btn {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .header-actions {
    gap: 2px;
  }
}

@media (max-width: 768px) {
  /* --- Top bar --- */
  .top-bar-inner {
    height: 34px;
    justify-content: center;
  }

  .gold-ticker {
    font-size: 0.75rem;
    gap: 5px;
  }

  .ticker-note {
    display: none;
  }

  /* --- Hero: restore side padding lost by overriding .container --- */
  .hero-content-wrap {
    padding: 30px 20px 22px;
  }

  .hero-content {
    padding: 0;
  }

  .hero-tag {
    justify-content: center;
    font-size: 0.75rem;
    margin-bottom: 12px;
  }

  .hero-title {
    font-size: 1.75rem;
    line-height: 1.32;
    margin-bottom: 12px;
    word-break: keep-all;
  }

  .hero-desc {
    font-size: 0.875rem;
    line-height: 1.65;
    margin-bottom: 22px;
    word-break: keep-all;
  }

  .hero-buttons {
    gap: 8px;
    margin-bottom: 24px;
  }

  .hero-buttons .btn {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    padding: 13px 12px;
    font-size: 0.875rem;
  }

  .hero-banner-img {
    height: 220px;
  }

  .page-arrows button {
    width: 36px;
    height: 36px;
  }

  /* --- Section rhythm --- */
  .main-content {
    padding: 28px 0 36px;
  }

  .page-content {
    padding: 28px 0 44px;
  }

  .page-hero {
    padding: 28px 0 24px;
  }

  .page-title {
    font-size: 1.5rem;
    word-break: keep-all;
  }

  .page-desc {
    font-size: 0.875rem;
    word-break: keep-all;
  }

  .content-grid {
    gap: 24px;
  }

  .categories {
    padding-bottom: 32px;
  }

  /* --- Product slider: keep arrows off the cards --- */
  .product-slider {
    padding: 0 0 28px;
  }

  .product-slider .slider-btn {
    width: 40px;
    height: 40px;
    top: 34%;
  }

  .slider-btn--prev {
    left: -6px;
  }

  .slider-btn--next {
    right: -6px;
  }

  .slider-dot {
    width: 10px;
    height: 10px;
  }

  /* --- Cards & tap targets --- */
  .wishlist-btn {
    width: 40px;
    height: 40px;
    top: 6px;
    right: 6px;
    font-size: 0.9375rem;
  }

  .product-name {
    font-size: 0.8125rem;
  }

  .product-price {
    font-size: 1rem;
  }

  .view-more {
    min-height: 40px;
    align-items: center;
    font-size: 0.875rem;
  }

  .section-header h3 {
    font-size: 1.0625rem;
  }

  /* --- Franchise banner --- */
  .membership-banner {
    padding: 32px 0;
  }

  .membership-inner {
    gap: 24px;
  }

  .membership-text h3 {
    font-size: 1.125rem;
    word-break: keep-all;
  }

  .membership-text p {
    font-size: 0.875rem;
    word-break: keep-all;
  }

  .membership-benefits {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 12px;
    width: 100%;
  }

  .membership-benefits span {
    font-size: 0.75rem;
  }

  /* --- Franchise page --- */
  .franchise-intro p,
  .franchise-intro {
    text-align: left;
  }

  .franchise-intro h2 {
    font-size: 1.25rem;
    text-align: left;
    word-break: keep-all;
  }

  .franchise-intro-tag {
    text-align: left;
  }

  .franchise-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .franchise-stat {
    padding: 18px 6px;
  }

  .franchise-stat strong {
    font-size: 1.375rem;
  }

  .franchise-stat span {
    font-size: 0.6875rem;
  }

  /* --- Product detail --- */
  .product-detail-grid {
    gap: 24px;
  }

  .product-detail-image {
    padding: 20px;
  }

  .product-detail-image img {
    max-height: 220px;
  }

  .product-detail-info h1 {
    font-size: 1.25rem;
    word-break: keep-all;
  }

  .product-detail-price {
    font-size: 1.5rem;
  }

  .product-detail-actions .btn-lg {
    padding: 15px 16px;
    font-size: 0.9375rem;
  }

  /* --- Price card --- */
  .price-card {
    padding: 18px;
  }

  .price-value {
    font-size: 1.75rem;
  }

  .price-more-btn {
    min-height: 44px;
  }

  /* --- Forms: 16px prevents iOS zoom-on-focus --- */
  .form-group input,
  .form-group textarea,
  .form-group select {
    font-size: 1rem;
    padding: 13px 14px;
  }

  .form-card {
    padding: 24px 20px;
  }

  .form-submit {
    min-height: 50px;
  }

  /* Primary CTAs read better full-width on a phone */
  .checkout-form .btn,
  .cart-checkout-btn,
  #cs-inquiry-form .btn,
  #franchise-inquiry-form .btn,
  .product-detail-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .content-card {
    padding: 24px 20px;
  }

  .content-card li a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }

  .cs-phone a,
  .footer-phone a {
    color: inherit;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }

  /* --- Cart --- */
  .cart-item {
    padding: 14px;
    gap: 12px;
  }

  .qty-btn {
    width: 34px;
    height: 34px;
  }

  .cart-remove-btn {
    min-height: 40px;
  }

  /* --- Footer --- */
  .footer-phone,
  .footer-phone a {
    font-size: 1.25rem;
    white-space: nowrap;
  }

  .footer-col h4 {
    font-size: 0.875rem;
  }

  .footer-col ul a {
    min-height: 36px;
    display: flex;
    align-items: center;
  }

  .footer-hours {
    word-break: keep-all;
  }

  .social-links a {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  /* Two columns reads better than one full-width card per row */
  .product-grid,
  .product-grid--page {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .category-list {
    gap: 10px;
  }

  .product-info {
    padding: 10px 10px 12px;
  }

  .product-price {
    font-size: 0.9375rem;
  }

  .product-per-gram {
    font-size: 0.6875rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .franchise-stat strong {
    font-size: 1.25rem;
  }

  .price-info-cards {
    gap: 12px;
  }

  .price-sources-grid {
    gap: 10px;
  }

  .price-source-btn {
    min-height: 92px;
    padding: 14px;
  }

  /* Cart total column drops under the item info */
  .cart-item {
    grid-template-columns: 76px 1fr;
  }

  .cart-item-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--gray-100);
  }

  .cart-item-total strong {
    font-size: 1rem;
  }

  .cart-remove-btn {
    margin-top: 0;
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    color: var(--gray-600);
  }
}
