/* =========================================================
   Phulwari v6.55 — storefront UX fixes (loaded last)
   ========================================================= */

/* ---------- Header: show the menu on tablets (768–1099px) ---------- */
@media (min-width:768px) and (max-width:1099px){
  .fv-header .fv-menu-toggle{display:none!important}
  .fv-header .fv-header-inner{grid-template-areas:"actions menu brand" "search search search"!important}
  .fv-header .fv-nav,
  .admin-bar .fv-header .fv-nav{
    grid-area:menu!important;position:static!important;display:block!important;
    max-height:none!important;overflow:visible!important;margin:0!important;padding:0!important;
    border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;
  }
  .fv-header .fv-nav > ul{display:flex!important;flex-wrap:wrap!important;justify-content:center!important;gap:2px!important}
  .fv-header .fv-nav a{min-height:40px!important;padding:8px 9px!important}
  .fv-header .fv-nav .sub-menu{
    position:absolute!important;display:none!important;top:calc(100% + 6px)!important;right:0!important;
    min-width:200px!important;margin:0!important;padding:8px!important;
    border:1px solid var(--fv-border)!important;border-radius:14px!important;
    background:var(--fv-surface)!important;box-shadow:var(--fv-shadow)!important;
  }
  .fv-header .fv-nav li:hover > .sub-menu,
  .fv-header .fv-nav li:focus-within > .sub-menu{display:block!important}
}

/* ---------- Header: compact on scroll (tablet + mobile) ---------- */
.fv-header .fv-search-toggle{display:none!important}
@media (max-width:1099px){
  .fv-header{transition:box-shadow .2s ease}
  .fv-header.fv-header--compact .fv-header-inner{padding-top:6px!important;padding-bottom:6px!important;row-gap:6px!important}
  .fv-header.fv-header--compact .fv-brand{min-height:38px!important}
  .fv-header.fv-header--compact .fv-brand img,
  .fv-header.fv-header--compact .fv-brand .custom-logo,
  .fv-header.fv-header--compact .fv-brand .fv-logo-img{max-height:38px!important}
  .fv-header.fv-header--compact .fv-header-search{display:none!important}
  .fv-header.fv-header--compact.is-search-open .fv-header-search{display:flex!important}
  .fv-header.fv-header--compact .fv-search-toggle{display:inline-flex!important}
  .fv-header.fv-header--compact.is-search-open .fv-search-toggle{background:#F5EBDD!important}
}

/* ---------- Breadcrumb spacing ---------- */
.woocommerce-breadcrumb .fv-crumb-sep{display:inline-block;margin:0 .5em;opacity:.55}

/* ---------- Prices ---------- */
.fv-price-unit{margin-inline-start:4px;color:var(--fv-muted,#7A6A5C);font-size:.78em;font-weight:500;white-space:nowrap}
.fv-price-from{color:var(--fv-muted,#7A6A5C);font-size:.85em;font-weight:500}
body.single-product .summary .price .fv-gift-from-price{display:block;margin-bottom:4px}
body.single-product .summary .price .fv-gift-price-placeholder{display:block}

/* ---------- Minimum-order note (home, shop, empty cart) ---------- */
.fv-min-order-note{margin:0 0 14px;color:var(--fv-gold-dark,#9B7020);font-size:var(--fv-type-muted-size);font-weight:600;line-height:1.8}
.fv-section-foot .fv-min-order-note{width:100%;text-align:center}
.fv-section-foot{flex-wrap:wrap}
.fv-min-order-note--shop{display:inline-block;margin:0 0 18px;padding:8px 14px;border:1px solid #E7D8AF;border-radius:11px;background:var(--fv-gold-soft,#FBF3DF)}
body.single-product .fv-min-order-hint span{display:block!important;margin-top:4px}

/* ---------- Product card image frame: every card the same height ---------- */
#products .fv-card .fv-card-media,.fv-empty-cart-grid .fv-card .fv-card-media{position:relative;display:block;overflow:hidden;min-height:0!important;height:auto!important}
#products .fv-card .fv-card-media img,.fv-empty-cart-grid .fv-card .fv-card-media img{position:absolute!important;inset:0!important;display:block;width:100%!important;height:100%!important;max-width:none!important;object-fit:cover!important}

/* WordPress auto-inserts an empty <p> (16px + 56px margins) after the button. */
.fv-card .fv-card-body > p:empty,.fv-card .fv-card-actions > p:empty{display:none!important}

/* ---------- Product card add-to-cart (home + empty cart) ---------- */
.fv-card-actions{margin-top:auto;padding-top:6px}
.fv-card-actions .button{
  display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;
  min-height:46px!important;margin:0!important;padding:10px 14px!important;border:0!important;border-radius:11px!important;
  background:var(--fv-blue-deep,#365D75)!important;color:#fff!important;
  font-family:inherit!important;font-size:var(--fv-type-muted-size)!important;font-weight:700!important;line-height:1.4!important;text-decoration:none!important;
}
.fv-card-actions .button:hover{filter:brightness(1.08)}
.fv-card-actions .button.fv-gift-loop-button{background:var(--fv-gold,#C79A32)!important}

/* ---------- "Why" cards are now links to the shop / gift pack ---------- */
.fv-why-card--link{position:relative}
.fv-why-card--link .fv-why-link{color:inherit;text-decoration:none}
.fv-why-card--link .fv-why-link::after{content:"";position:absolute;inset:0;border-radius:inherit;z-index:1}
.fv-why-card--link:hover h3,.fv-why-card--link:focus-within h3{color:var(--fv-blue-deep,#365D75)}
.fv-why-card--link .fv-why-link:focus-visible{outline:none}
.fv-why-card--link:focus-within{outline:2px solid var(--fv-gold,#C79A32);outline-offset:3px}

/* ---------- Single product: allergens / storage ---------- */
.fv-food-info{display:grid;gap:8px;margin:14px 0 18px;padding:0}
.fv-food-info__row{display:grid;gap:2px;padding:10px 13px;border:1px solid var(--fv-border);border-radius:11px;background:#fff}
.fv-food-info__row dt{color:var(--fv-dark);font-size:var(--fv-type-muted-size);font-weight:700}
.fv-food-info__row dd{margin:0;color:var(--fv-text-2,#5A4A3E);font-size:var(--fv-type-muted-size);line-height:1.8}
.fv-food-info__row--allergens{border-color:#E7C9A8;background:#FFF7EE}
.fv-food-info__row--allergens dt{color:#9A4B1F}

/* ---------- Gift-pack page: no empty column, readable choices ---------- */
@media (min-width:901px){
  body.fv-gift-pack-page div.product{
    direction:ltr;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    column-gap:34px;align-items:start!important;
  }
  body.fv-gift-pack-page div.product > *{grid-column:1 / -1;direction:rtl}
  body.fv-gift-pack-page div.product > .summary{grid-column:1!important;grid-row:1;float:none!important;width:auto!important;margin:0!important}
  body.fv-gift-pack-page div.product > .woocommerce-product-gallery{
    grid-column:2!important;grid-row:1;align-self:stretch!important;float:none!important;width:auto!important;margin:0!important;
    height:auto!important;min-height:0!important;position:relative!important;overflow:visible!important;
  }
  /* The image sticks inside its own column only, so it never covers the tabs below. */
  body.fv-gift-pack-page div.product > .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper,
  body.fv-gift-pack-page div.product > .woocommerce-product-gallery > .flex-viewport{position:sticky!important;top:130px!important}
  body.admin-bar.fv-gift-pack-page div.product > .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper,
  body.admin-bar.fv-gift-pack-page div.product > .woocommerce-product-gallery > .flex-viewport{top:162px!important}
  body.fv-gift-pack-page div.product > .woocommerce-product-gallery{display:block!important}
  body.fv-gift-pack-page div.product > .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper,
  body.fv-gift-pack-page div.product > .woocommerce-product-gallery > .flex-viewport{flex:none!important;height:auto!important;min-height:0!important;overflow:hidden;border-radius:22px}
  body.fv-gift-pack-page div.product > .woocommerce-product-gallery .woocommerce-product-gallery__image img{width:100%!important;height:auto!important;aspect-ratio:auto!important}
  body.fv-gift-pack-page div.product > .woocommerce-product-gallery > .woocommerce-product-gallery__trigger{z-index:3}
}
body.fv-gift-pack-page .fv-gift-options{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))!important}
body.fv-gift-pack-page .fv-gift-choice{grid-template-columns:52px minmax(0,1fr)!important;min-height:68px!important}
body.fv-gift-pack-page .fv-gift-choice__image{width:52px!important;height:52px!important}
body.fv-gift-pack-page .fv-gift-choice__name{font-size:12px!important;line-height:1.7!important}
@media (max-width:520px){
  body.fv-gift-pack-page .fv-gift-options{grid-template-columns:1fr!important}
}

/* ---------- Empty cart suggestions (compact: 4 per row, 2 on phones) ---------- */
.fv-empty-cart-suggest{margin:22px 0 18px}
.fv-empty-cart-suggest h2{margin:0 0 14px!important;color:var(--fv-dark)!important;font-size:var(--fv-type-item-size,17px)!important;line-height:1.6!important}
.fv-empty-cart-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:stretch}
.fv-empty-cart-grid .fv-card{display:flex;flex-direction:column;min-height:0!important;border:1px solid var(--fv-border);border-radius:16px;overflow:hidden;background:#fff}
.fv-empty-cart-grid .fv-card-media-wrap{flex:none}
.fv-empty-cart-grid .fv-card .fv-card-media{aspect-ratio:1/1!important}
.fv-empty-cart-grid .fv-card-body{flex:1;display:flex;flex-direction:column;gap:6px;padding:10px 12px 12px!important}
.fv-empty-cart-grid .fv-card-title{margin:0;font-size:var(--fv-type-muted-size,14px)!important;line-height:1.7!important}
.fv-empty-cart-grid .fv-card-title a{color:var(--fv-dark);text-decoration:none}
.fv-empty-cart-grid .fv-card-price{font-size:13px!important;line-height:1.7!important}
.fv-empty-cart-grid .fv-card-actions{margin-top:auto;padding-top:4px}
.fv-empty-cart-grid .fv-card-actions .button{min-height:40px!important;padding:8px 10px!important;font-size:13px!important}
@media (max-width:640px){.fv-empty-cart-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}

/* ---------- Footer extras ---------- */
.fv-footer-address,.fv-footer-hours{line-height:1.9;opacity:.92}

/* v6.61 — carousel arrows: SVG chevron centred in the circle */
.fv-carousel-arrow{display:grid!important;place-items:center!important;padding:0!important;line-height:1!important}
.fv-carousel-arrow svg{display:block;width:20px;height:20px}
