/* ==========================================================================
   responsive.css  |  breakpoint overrides (desktop-first)
   Checked at 320, 375, 390, 414, 576, 768, 992, 1200 and 1400 px.
   ========================================================================== */

/* Large screens: keep the floral tile from looking tiny on wide monitors */
@media (min-width: 1800px) {
  :root { --bg-tile-size: 960px; }
}

@media (max-width: 1199.98px) {
  :root { --bg-tile-size: 700px; }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .cart-row { grid-template-columns: 88px 1fr auto 100px auto; }
}

@media (max-width: 991.98px) {
  :root { --header-height: 64px; --bg-tile-size: 620px; }

  .navbar-brand img { height: 48px; }
  .navbar-nav { margin-top: 0.25rem; }
  .navbar-nav .nav-link { padding: 0.85rem 0; font-size: 1.05rem; border-bottom: 1px solid var(--color-border); }
  .navbar .nav-link.active { color: var(--color-berry); }
  .navbar .offcanvas-body { flex-direction: column; }

    .hero::before { display: none; }
  .hero-visual { max-width: 380px; }
  .hero .row > div { flex: 0 0 100%; max-width: 100%; }
  .hero .col-lg-6:first-child { order: 2; }
  .hero .col-lg-6:last-child { order: 1; margin-bottom: 1.5rem; }
  .hero-actions, .hero-points { display: none; }
  .cta-actions { justify-content: flex-start; }
  .summary-card { position: static; }
  .filters-panel { --bs-offcanvas-width: 320px; }
  .filters-panel .filters { padding: 0; border: 0; border-radius: 0; background: transparent; }

  .auth-aside { padding: 2rem 1.5rem; }
  .auth-aside img { width: 120px; }
}

@media (max-width: 767.98px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .shop-sort { flex: 1 1 100%; width: 100%; }
  .order-meta-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-brand { margin-bottom: 0.5rem; }
}

@media (max-width: 575.98px) {
  /* Narrow screens: smaller, denser flowers so the texture stays delicate, fully uniform behind content */
  :root { --bg-tile-size: 520px; --bg-tile-opacity: 0.5; }
  .site-footer { --footer-fringe: 40px; }
  .site-footer::after { background-size: 480px auto; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-thumb-a { inset-inline-start: -3%; }
  .cart-modal .modal-footer { flex-direction: column-reverse; }
  .cart-modal .modal-footer .btn { width: 100%; }
  .hero-thumb-b { inset-inline-end: -3%; }
  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .category-tile { padding: 1.1rem 0.5rem; }

  /* Compact product cards: two per row */
  .product-content { padding: 0.75rem; }
  .product-name { font-size: 0.95rem; }
  .product-description { display: none; }
  .current-price { font-size: 1.05rem; }
  .add-to-cart-btn { --bs-btn-padding-x: 0.5rem; font-size: 0.85rem; }
  .badge-tag { font-size: 0.72rem; padding-inline: 0.45rem; }

  /* Cart rows stack into two lines */
  .cart-row { grid-template-columns: 72px 1fr auto; grid-template-areas: 'thumb info remove' 'qty qty total'; gap: 0.75rem; }
  .cart-thumb-link { grid-area: thumb; }
  .cart-thumb { width: 72px; height: 72px; }
  .cart-info { grid-area: info; }
  .cart-remove { grid-area: remove; align-self: start; }
  .cart-row .qty-stepper { grid-area: qty; justify-self: start; }
  .cart-line-total { grid-area: total; }

  .info-list dt { flex-basis: 100%; }
  .gallery-thumb { width: 72px; }
  .pdp-actions .qty-stepper { flex: 1 1 100%; justify-content: space-between; }
  .pdp-actions .qty-value { flex: 1; }

  /* Timeline turns vertical */
  .timeline { grid-template-columns: 1fr; gap: 1.5rem; }
  .timeline-step { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 1rem; padding: 0; text-align: start; }
  .timeline-dot { margin-bottom: 0; }
  .timeline-title { flex: 1; }
  .timeline-text { flex-basis: 100%; padding-inline-start: 60px; margin-top: -0.6rem; }
  .timeline-step::before { top: -1.5rem; inset-inline-start: 21px; width: 2px; height: 1.5rem; }

  .order-card-head { flex-wrap: wrap; }

  /* Checkout: saved addresses */
  .address-option { flex-wrap: wrap; overflow: hidden; }
  .address-main { flex: 1 1 100%; padding: 1rem 1rem 0.9rem; }
  /* Action bar: a full-width strip at the bottom of the card, two equal halves */
  .address-actions {
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.6);
    border-top: 1px solid var(--color-border);
  }
  .address-option:has(input:checked) .address-actions { border-top-color: var(--color-petal-line); background: rgba(255, 255, 255, 0.55); }
  .address-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: auto;
    min-height: 46px;
    padding: 0 0.75rem;
    font-size: 0.92rem;
    font-weight: 700;
    background: transparent;
    border: 0;
    border-radius: 0;
  }
  .address-action + .address-action { border-inline-start: 1px solid var(--color-border); }
  .address-option:has(input:checked) .address-action + .address-action { border-inline-start-color: var(--color-petal-line); }
  .address-action:not(.is-danger) { color: var(--color-berry); }
  .address-action.is-danger { color: var(--color-danger); }
  .address-action:active { background: rgba(168, 23, 79, 0.1); }
  .address-action.is-danger:active { background: rgba(179, 38, 30, 0.1); }
  .address-action-text { display: inline; }
  .address-add-box { padding: 1.5rem 0.75rem; }
  .address-modal .modal-footer { flex-direction: column-reverse; }
  .address-modal .modal-footer .btn { width: 100%; margin: 0; }
  .address-modal .modal-header, .address-modal .modal-body, .address-modal .modal-footer { padding-inline: 1rem; }
  .address-modal .modal-dialog.modal-fullscreen-sm-down { height: 100dvh; }
  .address-modal .modal-dialog.modal-fullscreen-sm-down .modal-content { height: 100%; border-radius: 0; }
  .delete-body .modal-actions { flex-direction: column-reverse; }
  .delete-body .modal-actions .btn { width: 100%; }
}

@media (max-width: 374.98px) {
  .container { --bs-gutter-x: 1.5rem; }
  .row.g-3 { --bs-gutter-x: 0.6rem; }
  .icon-btn { width: 38px; height: 38px; }
  .navbar-brand img { height: 42px; }
  .hero-title { font-size: 2.2rem; }
  .btn-lg { --bs-btn-padding-x: 1.2rem; }
  .order-meta-grid { grid-template-columns: 1fr; }
}