/* ==========================================================================
   JB Sweet Temptations — Mobile Dedicated Stylesheet (max-width: 767px)
   Encapsulated overrides for mobile phones (320px - 767px)
   Leaves Desktop & Tablet (>=768px) 100% UNTOUCHED
   ========================================================================== */

@media (max-width: 767px) {

  /* ------------------------------------------------------------------------
     1. Layout, Viewport Bounds & Safe Area Inset Variables
     ------------------------------------------------------------------------ */
  :root {
    --header-height: 50px;
    --bottom-bar-height: 60px;
  }

  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    padding-top: var(--header-height);
    padding-bottom: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom, 0px) + 20px);
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding-left: 14px;
    padding-right: 14px;
    box-sizing: border-box;
  }

  .section-padding {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .section-header {
    margin-bottom: 20px;
  }

  .section-kicker {
    font-size: 0.75rem;
    padding: 3px 10px;
    margin-bottom: 6px;
  }

  .section-title {
    font-family: var(--font-serif) !important;
    font-weight: 700 !important;
    font-style: italic !important;
    font-size: 1.7rem; /* ~27px */
    line-height: 1.2;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
  }

  .section-intro {
    font-size: 0.94rem;
    line-height: 1.45;
  }

  /* ------------------------------------------------------------------------
     2. Mobile Compact Header (Sleek 50px Bar, 40px Controls)
     ------------------------------------------------------------------------ */
  .app-header {
    height: 50px;
    background-color: #EDCCD7;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 2px 10px rgba(180, 120, 140, 0.25);
    transition: background-color 0.3s ease;
  }

  .header-container {
    height: 50px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .icon-btn {
    min-width: 40px;
    min-height: 40px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    color: #FFFFFF !important;
  }

  .hamburger-inner,
  .hamburger-inner::before,
  .hamburger-inner::after {
    background-color: #AD246F !important;
  }

  .side-nav .close-btn,
  #nav-close-btn {
    background-color: var(--color-pink) !important;
    color: var(--color-ink) !important;
    border: 1px solid var(--color-pink-border) !important;
    border-radius: var(--radius-full) !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 6px rgba(44, 42, 41, 0.08) !important;
  }

  .side-nav .close-btn svg,
  #nav-close-btn svg {
    stroke: var(--color-ink) !important;
    stroke-width: 2.2 !important;
  }

  .side-nav .close-btn:hover,
  .side-nav .close-btn:focus-visible,
  #nav-close-btn:hover,
  #nav-close-btn:focus-visible {
    background-color: #EAC9D8 !important;
    color: var(--color-fuchsia-dark) !important;
    border-color: var(--color-pink-border) !important;
  }

  .side-nav .close-btn:hover svg,
  .side-nav .close-btn:focus-visible svg,
  #nav-close-btn:hover svg,
  #nav-close-btn:focus-visible svg {
    stroke: var(--color-fuchsia-dark) !important;
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .lang-btn {
    min-height: 34px;
    min-width: 38px;
    padding: 4px 10px;
    font-size: 0.8rem;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(173, 36, 111, 0.4);
    color: #AD246F;
    border-radius: var(--radius-full);
  }

  .lang-btn:hover {
    background-color: #FFFFFF;
  }

  .lang-indicator {
    color: #7A2250;
  }

  .lang-indicator.active-lang {
    color: #AD246F;
    font-weight: 800;
  }

  .lang-divider {
    color: rgba(173, 36, 111, 0.5);
  }

  /* ------------------------------------------------------------------------
     3. Mobile Hero (Clean Soft Pink Banner, Large White Emblem & Buttons)
     ------------------------------------------------------------------------ */
  .hero-section {
    min-height: 220px !important;
    height: auto !important;
    max-height: none !important;
    padding: 20px 0 16px 0 !important;
    background: #EDCCD7 !important;
    border-bottom: 2px solid #FFFFFF !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
    overflow: hidden !important;
    transition: background-color 0.3s ease !important;
  }

  .hero-visual,
  .hero-gradient-overlay,
  .hero-decor {
    display: none !important;
  }

  .hero-inner-container {
    position: relative !important;
    z-index: 3 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    box-sizing: border-box !important;
  }

  .hero-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  .hero-brand-group {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }

  .hero-emblem-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 6px !important;
  }

  .hero-logo-emblem {
    width: 155px !important;
    height: 155px !important;
    max-width: 48vw !important;
    object-fit: contain !important;
    display: block !important;
    filter: brightness(0) invert(1) !important;
  }

  /* Hide redundant kicker and subtitle exclusively on mobile */
  .hero-kicker,
  .hero-subtitle {
    display: none !important;
  }

  .hero-text-block {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
  }

  .hero-title {
    font-family: var(--font-serif) !important;
    font-size: 1.5rem !important; /* ~24px */
    font-weight: 700 !important;
    font-style: italic !important;
    line-height: 1.18 !important;
    color: #FFFFFF !important;
    text-align: center !important;
    margin: 0 0 14px 0 !important;
    letter-spacing: -0.01em !important;
    -webkit-text-stroke: none !important;
    text-shadow: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Single centered row of 44px buttons with 8-12px gap and no line wrapping */
  .hero-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .btn-hero {
    min-height: 44px;
    height: 44px;
    padding: 0 18px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-align: center;
    gap: 6px;
    box-sizing: border-box;
    flex-shrink: 0;
  }

  .btn-hero svg {
    flex-shrink: 0;
  }

  .btn-hero.btn-primary {
    background-color: #FFFFFF !important;
    color: #AD246F !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25) !important;
    font-weight: 800 !important;
  }

  .btn-hero.btn-secondary,
  .btn-hero-outline {
    background-color: rgba(255, 255, 255, 0.90) !important;
    color: #AD246F !important;
    border: 1.5px solid #AD246F !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12) !important;
    font-weight: 700 !important;
  }

  /* Extra compact adjustments for very small screens (320px) */
  @media (max-width: 340px) {
    .hero-title {
      font-size: 1.2rem;
    }
    .hero-actions {
      gap: 6px;
    }
    .btn-hero {
      padding: 0 12px;
      font-size: 0.78rem;
    }
  }

  /* ------------------------------------------------------------------------
     4. Mobile Specialties Cards
     ------------------------------------------------------------------------ */
  .specialties-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
    min-width: 0;
  }

  .specialty-card {
    border-radius: var(--radius-lg);
    width: 100%;
    box-sizing: border-box;
    background-color: #FFFFFF !important;
    border: 1px solid #E8E2DE !important;
    box-shadow: 0 4px 14px rgba(44, 42, 41, 0.06) !important;
    overflow: hidden;
  }

  .card-img-wrap {
    height: auto !important;
    aspect-ratio: 4/3 !important;
  }

  .card-body {
    padding: 16px;
    background-color: #FFFFFF !important;
  }

  .card-title {
    font-family: var(--font-serif) !important;
    font-weight: 700 !important;
    font-style: italic !important;
    font-size: 1.35rem !important;
    color: #2C2A29 !important;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
  }

  .card-text {
    font-size: 0.9rem !important;
    color: #5C5856 !important;
    line-height: 1.45;
    margin-bottom: 12px;
  }

  .card-link {
    color: var(--color-fuchsia-dark, #C03B83) !important;
    font-weight: 700 !important;
    font-size: 0.92rem !important;
  }

  /* ------------------------------------------------------------------------
     5. Mobile Menu Section & DoorDash Item Cards
     ------------------------------------------------------------------------ */
  .menu-notice-box {
    font-size: 0.82rem;
    padding: 8px 12px;
    margin-top: 10px;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
  }

  .menu-controls {
    margin-bottom: 18px;
    width: 100%;
  }

  .menu-search-wrapper {
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .menu-search-input {
    min-height: 44px;
    font-size: 0.88rem;
    padding: 10px 36px 10px 38px;
    box-sizing: border-box;
  }

  .category-tabs-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px 6px !important;
    margin-bottom: 18px !important;
    padding: 0 0 6px 0 !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    box-sizing: border-box !important;
  }

  .cat-tab {
    min-height: 44px !important;
    padding: 8px 14px !important;
    font-size: 0.84rem !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: var(--radius-full) !important;
    flex: 0 1 auto !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .menu-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
    min-width: 0;
  }

  .doordash-item-card {
    padding: 12px;
    gap: 10px;
    border-radius: var(--radius-md);
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
  }

  .menu-card-content {
    min-width: 0;
    flex-grow: 1;
  }

  .menu-card-title {
    font-size: 0.98rem; /* ~16px */
    line-height: 1.25;
    margin-bottom: 2px;
  }

  .menu-card-desc {
    font-size: 0.82rem; /* ~13.5px */
    line-height: 1.35;
    margin-bottom: 6px;
    -webkit-line-clamp: 2;
  }

  .menu-card-footer {
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
  }

  .menu-card-price {
    font-size: 0.88rem;
    padding: 2px 6px;
  }

  .menu-card-order-btn {
    min-height: 38px;
    padding: 6px 12px;
    font-size: 0.78rem;
  }

  /* Consistent 88px Thumbnails & Placeholders */
  .menu-card-img-wrap {
    width: 88px;
    height: 88px;
    min-width: 88px;
    min-height: 88px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
  }

  .menu-card-placeholder {
    padding: 4px 2px;
    gap: 3px;
  }

  .placeholder-cam-icon {
    width: 20px;
    height: 20px;
  }

  .placeholder-text {
    font-size: 0.62rem;
    line-height: 1.1;
  }

  .menu-bottom-cta {
    padding: 24px 14px;
    margin-top: 24px;
    border-radius: var(--radius-lg);
    box-sizing: border-box;
  }

  .menu-bottom-cta h3 {
    font-size: 1.35rem;
    margin-bottom: 4px;
  }

  .menu-bottom-cta p {
    font-size: 0.9rem;
    margin-bottom: 16px;
  }

  .menu-cta-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .menu-cta-actions .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    box-sizing: border-box;
  }

  /* ------------------------------------------------------------------------
     6. Mobile Gallery
     ------------------------------------------------------------------------ */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
  }

  .gallery-item-btn {
    min-height: 44px;
    border-radius: var(--radius-md);
  }

  /* ------------------------------------------------------------------------
     7. Mobile Story Section (Nuestra Historia)
     ------------------------------------------------------------------------ */
  .story-container {
    grid-template-columns: 1fr;
    gap: 22px;
    width: 100%;
    min-width: 0;
  }

  .story-paragraph {
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 12px;
  }

  .story-tagline {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 700;
    font-style: italic;
    color: var(--color-fuchsia);
    text-align: center;
    margin: 12px 0 18px 0;
  }

  .story-highlights {
    gap: 10px;
    margin-top: 14px;
    width: 100%;
  }

  .highlight-item {
    padding: 10px 12px;
    gap: 10px;
    border-radius: var(--radius-md);
    box-sizing: border-box;
    width: 100%;
  }

  .highlight-icon {
    font-size: 1.3rem;
  }

  .highlight-item strong {
    font-size: 0.92rem;
  }

  .highlight-item p {
    font-size: 0.82rem;
  }

  .story-visual-grid {
    gap: 12px;
    width: 100%;
  }

  .story-image-card {
    box-sizing: border-box;
    width: 100%;
  }

  .story-img-owner {
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center 78% !important;
  }

  .story-img-store {
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: center;
  }

  .story-img-badge {
    font-size: 0.72rem;
    padding: 3px 10px;
    bottom: 8px;
    left: 8px;
  }

  /* ------------------------------------------------------------------------
     8. Mobile Continuous Brand Background & Scaled Accents (Behind Content)
     ------------------------------------------------------------------------ */
  .page-brand-bg {
    background-color: #FAF8F6 !important;
    background-image: linear-gradient(rgba(250, 248, 246, 0.93), rgba(250, 248, 246, 0.93)), url('assets/brand/pattern-original.png') !important;
    background-size: auto, 760px auto !important;
    background-repeat: repeat, repeat-y !important;
    background-position: center top !important;
  }

  [data-theme="dark"] .page-brand-bg {
    background-color: #0A0B0B !important;
    background-image: linear-gradient(rgba(10, 11, 11, 0.90), rgba(10, 11, 11, 0.90)), url('assets/brand/pattern-original.png') !important;
    background-size: auto, 760px auto !important;
    background-repeat: repeat, repeat-y !important;
    background-position: center top !important;
  }

  .brand-decor {
    position: absolute !important;
    pointer-events: none !important;
    user-select: none !important;
    z-index: 0 !important;
  }

  .decor-shape-pink-spec {
    top: 15px !important;
    right: -15px !important;
    width: 130px !important;
    opacity: 0.18 !important;
  }

  .decor-heart-spec {
    bottom: 0 !important;
    left: 0 !important;
    width: 100px !important;
    opacity: 0.16 !important;
  }

  .decor-shape-pink-menu {
    top: 8% !important;
    left: -15px !important;
    width: 110px !important;
    opacity: 0.16 !important;
  }

  .decor-heart-menu {
    bottom: 0 !important;
    right: 0 !important;
    width: 110px !important;
    opacity: 0.15 !important;
  }

  .decor-shape-pink-gallery {
    top: 5% !important;
    right: -15px !important;
    width: 120px !important;
    opacity: 0.16 !important;
  }

  .decor-heart-gallery {
    bottom: 0 !important;
    left: 0 !important;
    width: 100px !important;
    opacity: 0.15 !important;
  }

  .decor-shape-pink-story {
    top: 4% !important;
    left: -15px !important;
    width: 130px !important;
    opacity: 0.18 !important;
  }

  .decor-heart-story {
    bottom: 0 !important;
    right: 0 !important;
    width: 105px !important;
    opacity: 0.16 !important;
  }

  .decor-shape-pink-location {
    top: 6% !important;
    right: -15px !important;
    width: 120px !important;
    opacity: 0.16 !important;
  }

  .decor-heart-location {
    bottom: 0 !important;
    left: 0 !important;
    width: 95px !important;
    opacity: 0.15 !important;
  }

  /* ------------------------------------------------------------------------
     9. Mobile Location & Contact Section
     ------------------------------------------------------------------------ */
  .location-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    width: 100%;
    min-width: 0;
  }

  .location-photo-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    width: 100%;
    aspect-ratio: 4 / 3 !important;
    box-sizing: border-box;
  }

  .location-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center 12% !important;
  }

  .location-info-card {
    padding: 18px 14px;
    gap: 16px;
    border-radius: var(--radius-lg);
    width: 100%;
    box-sizing: border-box;
  }

  .info-block {
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .info-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  .info-heading {
    font-size: 1.05rem;
  }

  .info-value {
    font-size: 0.88rem;
    line-height: 1.45;
    word-break: break-word;
  }

  .hours-list {
    width: 100%;
  }

  .hours-list li {
    font-size: 0.85rem;
    padding: 4px 0;
  }

  .social-buttons-wrap {
    gap: 8px;
  }

  .social-buttons-wrap .btn {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  .location-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .location-actions .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    box-sizing: border-box;
  }

  /* ------------------------------------------------------------------------
     9. Mobile Footer
     ------------------------------------------------------------------------ */
  .footer-container {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 32px;
    padding-bottom: 24px;
    width: 100%;
    box-sizing: border-box;
  }

  .footer-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .footer-logo-img {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
  }

  .footer-bottom-flex {
    flex-direction: column;
    gap: 8px;
  }

  /* ------------------------------------------------------------------------
     10. Mobile Bottom Action Bar (App-Style)
     ------------------------------------------------------------------------ */
  .mobile-bottom-bar {
    height: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background-color: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--color-border);
  }

  /* ------------------------------------------------------------------------
     11. Mobile Category Floating Modal (Ventana Flotante de Especialidades)
     ------------------------------------------------------------------------ */
  .cat-modal-dialog {
    max-width: 92% !important;
    width: 92% !important;
    max-height: 80vh !important;
    margin: auto !important;
    background-color: #FFFFFF !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--color-border, #E8E2DE) !important;
    box-shadow: 0 16px 40px rgba(44, 42, 41, 0.25) !important;
  }

  .cat-modal-header {
    padding: 14px 16px !important;
    background: linear-gradient(135deg, #FFF0F6 0%, #FDE8F1 100%) !important;
    border-bottom: 1px solid var(--color-pink-border, #F7C0D8) !important;
  }

  .cat-modal-title {
    font-size: 1.25rem !important;
    color: var(--color-ink, #2C2A29) !important;
  }

  .cat-modal-close-btn {
    background: #FFFFFF !important;
    border: 1px solid var(--color-pink-border, #F7C0D8) !important;
    color: var(--color-ink, #2C2A29) !important;
  }

  .cat-modal-body {
    padding: 14px 12px !important;
    background-color: #FAF8F6 !important;
    gap: 10px !important;
  }

  .cat-modal-item {
    padding: 10px 12px !important;
    gap: 10px !important;
    background: #FFFFFF !important;
    border: 1px solid var(--color-border, #E8E2DE) !important;
    box-shadow: 0 2px 6px rgba(44, 42, 41, 0.04) !important;
  }

  .cat-modal-item-name {
    color: var(--color-ink, #2C2A29) !important;
  }

  .cat-modal-item-desc {
    color: var(--color-ink-muted, #5C5856) !important;
  }

  .cat-modal-item-price {
    color: var(--color-ink, #2C2A29) !important;
  }

  .cat-modal-footer {
    padding: 12px 16px !important;
    background: #FFFFFF !important;
    border-top: 1px solid var(--color-border, #E8E2DE) !important;
  }
}

