/* ============================================================
   Responsive overrides for theme3711 / Bootstrap 2.x layout
   Breakpoints: mobile < 768px | tablet 768–979px | desktop 980px+
   ============================================================ */

/* ── Hero banner: full-width background, logo top-left, caption bottom ── */
#hero-banner {
  position: relative;
  width: 100%;
  height: 380px;
  background: url('/templates/theme3711/images/template/top_banner.jpg') center center / cover no-repeat;
}
#hero-banner #logo { position: absolute; top: 0; left: 0; padding: 20px 24px; z-index: 2; }
#hero-banner #logo a { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
#hero-banner #logo img { height: 120px; width: auto; display: block; }
#hero-banner #logo h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
#hero-banner .slide-title {
  position: absolute;
  top: 58%;
  left: 40px;
  right: 40px;
  margin: 0;
  color: #fff;
  font-size: 26px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
@media (max-width: 767px) {
  #hero-banner { aspect-ratio: auto; height: 220px; }
  #hero-banner #logo { padding: 14px 16px; }
  #hero-banner #logo img { height: 44px; }
  #hero-banner #logo h1 { font-size: 18px; }
  #hero-banner .slide-title { top: 55%; left: 20px; right: 20px; font-size: 16px; }
  #hero-banner .slide-title { font-size: 16px; }
}

/* ── Footer: contact + copyright only, compact ───────────── */
#footer-wrapper {
  background: url('/templates/theme3711/images/template/footerBg.png') center 0 no-repeat transparent !important;
  min-height: 400px !important;
  color: #000 !important;
}
#footer-wrapper .footer-wrapper-inner {
  padding-top: 20px !important;
}
#footer-wrapper a, #footer-wrapper * { color: #000 !important; }
#footer-wrapper { height: auto !important; }
#wrapper { margin-bottom: 0 !important; }
#push { height: 0 !important; }

#copyright-row { padding: 12px 0 10px; }
#copyright-row .row-container { margin-left: 0 !important; max-width: none; padding-left: 12px; }
#copyright-row .moduleTitle { font-size: 14px; margin-bottom: 2px; }
#copyright-row .item_introtext { font-size: 12px; line-height: 1.3; }
#copyright-row .moduletable { margin-bottom: 0; max-width: 320px; }
#copyright-row .mod-article-single { margin-bottom: 0; }
#footer-social { float: right; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 12px 0 0; }
#footer-social a { opacity: 0.9; }
#footer-social a:hover { opacity: 1; }
#copyright-row p { margin: 0; }
#copyright { padding-top: 2px; margin-top: 2px; border-top: none; }

/* ── Benefits: plain text block ──────────────────────────── */
.benefits-text { padding: 0 20px 20px; font-size: 15px; line-height: 1.7; text-align: left; }
.benefits-text p { margin-bottom: 12px; }
#benefits-row-2 {
  display: flex;
  justify-content: center;
}
#benefits-row-2 .span4 {
  float: none;
  flex: 0 0 31.914893617%;
}

/* ── Products: override folio hide, show 3 static cards ──── */
.mod-newsflash-adv.folio .item { display: block !important; }

/* center the 3-item product row */
#module_137 .row-fluid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
#module_137 .row-fluid .span4 {
  float: none;
  flex: 0 0 31.914893617%;
}
@media (max-width: 767px) {
  #module_137 .row-fluid {
    display: block !important;
    text-align: center;
  }
  #module_137 .row-fluid .span4 {
    display: inline-block !important;
    float: none !important;
    width: 90% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: left;
  }
}

/* product card figure: fit image, center it */
#module_137 figure.item_img {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto;
}
#module_137 figure.item_img img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: contain;
}
@media (min-width: 768px) and (max-width: 979px) {
  #module_137 .row-fluid .span4 { flex: 0 0 48%; }
}

/* ── Welcome section text ────────────────────────────────── */

/* ── Welcome section text ────────────────────────────────── */
#module_133 h3.custom span { font-size: 36px !important; line-height: 1.5 !important; }

/* ── Welcome section images ──────────────────────────────── */
#module_134 .item_img img { width: 400px; height: 280px; object-fit: cover; }
@media (max-width: 767px) {
  #module_134 { float: none !important; text-align: center !important; width: 100% !important; }
  #module_134 .row-fluid { float: none !important; display: block; margin: 0 auto !important; }
  #module_134 .item_img img { display: block; margin: 0 auto; width: 100%; max-width: 400px; }
}

/* ── Did you know section ────────────────────────────────── */
#maintop-row { background-size: cover; background-repeat: no-repeat; background-attachment: scroll !important; height: 400px; padding: 0; }
#maintop-row, #maintop-row h1, #maintop-row h2, #maintop-row h3, #maintop-row h4, #maintop-row h5, #maintop-row h6 { color: #000 !important; }

/* ── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

img { max-width: 100%; height: auto; }

/* ============================================================
   TABLET  768 – 979 px
   ============================================================ */
@media (max-width: 979px) {

  .row-container { padding: 0 16px; }

  /* Header: logo 30%, nav 60%, search 10% */
  #top .span3  { width: 28%; }
  #top .span7  { width: 58%; }
  #top .span2  { width: 14%; }

  /* Products / Recipes / News: 3 cols → 2 cols */
  .row-fluid .span4.gallery-item,
  #content-bottom-row .row-fluid .span4,
  #module_130 .row-fluid .span4 {
    width: 48%;
    margin-left: 2%;
  }
  #content-bottom-row .row-fluid .span4:first-child,
  #module_130 .row-fluid .span4:first-child,
  .row-fluid .span4.gallery-item:first-child { margin-left: 0; }

  /* Footer: 4 cols → 2 cols */
  #copyright-row .row-fluid .span3,
  #copyright-row .row-fluid .span2,
  #copyright-row .row-fluid .span4 {
    width: 48%;
    margin-left: 2%;
    margin-bottom: 24px;
    float: left;
  }
  #copyright-row .row-fluid .span3:first-child,
  #copyright-row .row-fluid .span2:first-child { margin-left: 0; }

  /* Megamenu: kill fixed pixel widths on sub-panels */
  .icesubMenu,
  .icemega_cover_module,
  .iceCols { width: auto !important; max-width: 100% !important; }
  .icesubMenu { left: 0 !important; right: auto; }

  /* Slider: smaller min-height */
  .camera_wrap { min-height: 300px !important; }
}

/* ============================================================
   MOBILE  < 768 px
   ============================================================ */
@media (max-width: 767px) {

  body { font-size: 15px; }

  .row-container { padding: 0 12px; }

  /* ── Bootstrap 2 span-* → 100% ── */
  .row-fluid [class*="span"] {
    float: none !important;
    display: block;
    width: 100% !important;
    margin-left: 0 !important;
    margin-bottom: 0;
  }

  /* ── Header ── */
  #top-row { padding: 10px 0; }

  #logo { text-align: center; margin-bottom: 8px; }
  #logo img { max-height: 60px; width: auto; }

  /* Search bar: shrink and center */
  .search-block { text-align: center; }
  .search-block .mod-search { display: inline-block; }

  /* ── Megamenu ── */
  .ice-megamenu-toggle { display: block !important; }
  .ice-megamenu-toggle a {
    display: block;
    padding: 10px 16px;
    background: #333;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    border-radius: 4px;
    cursor: pointer;
  }

  /* Collapse target hidden until toggled */
  .nav-collapse.collapse { display: none; }
  .nav-collapse.collapse.in { display: block; }

  /* Kill inline fixed widths set by the megamenu JS */
  .icesubMenu,
  .icemega_cover_module,
  .iceCols,
  .icemegamenu .icesubMenu { width: auto !important; max-width: 100% !important; }

  /* Stack megamenu items vertically */
  #icemegamenu,
  #icemegamenu ul.icesubMenu { position: static !important; width: 100% !important; }
  #icemegamenu > li { float: none; display: block; border-bottom: 1px solid #e8e8e8; }
  #icemegamenu > li > a { display: block; padding: 10px 12px; }
  .icemegamenu .iceCols { float: none !important; display: block !important; }
  .icesubMenu.visible { display: block !important; position: static !important; }

  /* ── Slider ── */
  .camera_wrap { min-height: 200px !important; }
  .camera_caption .slide-title { font-size: 16px !important; }

  /* ── Products grid: 1 col ── */
  .gallery-item.span4 {
    width: 100% !important;
    margin-left: 0 !important;
    margin-bottom: 20px;
  }

  /* ── Showcase carousel ── */
  #showcase-row .list_carousel { overflow-x: auto; }

  /* ── Main content area ── */
  #content-bottom-row .row-fluid .span4,
  #module_130 .row-fluid .span4 {
    width: 100% !important;
    margin-left: 0 !important;
    margin-bottom: 28px;
  }

  /* ── Footer columns ── */
  #copyright-row .row-fluid .span3,
  #copyright-row .row-fluid .span2,
  #copyright-row .row-fluid .span4 {
    width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
    margin-bottom: 28px;
  }

  /* ── Map ── */
  .rd-google-map { height: 250px !important; }

  /* ── Newsletter form ── */
  .acymailing_module input[type="text"],
  .acymailing_module input[type="email"] { width: 100% !important; }

  /* ── Cookie bar ── */
  #cookieMessageContainer { font-size: 12px; }

  /* ── Misc ── */
  .moduletable { margin-bottom: 20px; }
  .pretext { font-size: 14px; }
}

/* ============================================================
   SMALL MOBILE  < 480 px
   ============================================================ */
@media (max-width: 479px) {

  #logo img { max-height: 48px; }
  .camera_wrap { min-height: 160px !important; }
  .camera_caption .slide-title { font-size: 14px !important; padding: 6px 10px !important; }

  /* Filters bar: wrap buttons */
  .filters ul { flex-wrap: wrap; padding: 0; }
  .filters ul li { margin: 4px 2px; }
  .filters ul li a { font-size: 13px; padding: 5px 10px; }
}
