/*
Theme Name: ARM Ultra Minimal Basic 6
Author: Arkansas Redneck Mealworm Farm
Description: Simple, consistent 6-page theme with centered layout and OD-green header/nav. No Gutenberg blocks required.
Version: 1.0.10
Text Domain: arm-ultra-minimal-basic-6
*/

:root{
  --od:#3e5a2f;
  --ink:#1b1f1b;
  --bg:#f5f6f3;
  --hover:#d4e0c6;
}

/* Base reset & layout */
*{box-sizing:border-box}

html,
body{
  margin:0;
  padding:0;
  min-height:100vh;
  background:var(--bg);
  color:var(--ink);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
}

/* Common WP wrappers */
#page,
.site,
.site-content,
.content-area{
  min-height:100vh;
  background:var(--bg);
  display:flex;
  flex-direction:column;
}

/* Main content grows */
main,
#primary{
  flex:1 0 auto;
}

/* Global container */
.container{
  max-width:1100px;
  margin:0 auto;
  padding:0 16px;
}

.center{text-align:center}

/* Header */
header.arm-header{
  background:var(--od);
  color:#fff;
  padding:18px 0;
  margin:0 0 18px;
  border-radius:0 0 14px 14px;
}

/* Header container override – let buttons go further right */
.arm-header .container{
  padding-right:0;        /* remove right padding so buttons can hug the edge */
  padding-left:16px;      /* keep left padding for title/nav alignment */
}

/* Site title line */
.arm-title{
  margin:0 0 8px;
  font-size:clamp(22px,3vw,30px);
  text-align:center;
  letter-spacing:.3px;
}

.arm-title a{
  color:#fff;
  text-decoration:none;
}

/* Second row: nav centered, contact buttons on the right */
.arm-header-row{
  position:relative;
  display:flex;
  justify-content:center;   /* keep nav centered */
  align-items:flex-start;
  margin-top:4px;
}

/* Nav wrapper: content-sized, not stretching */
.arm-header-row nav{
  flex:0 0 auto;
}

/* Center nav buttons inside nav */
.arm-nav{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px;
  margin:0;
  padding:0;
  list-style:none;
}

/* MAIN NAV BUTTONS */
.arm-nav a{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  height:37px;
  padding:0 24px;
  border-radius:17px;

  background:#a6bd97;
  color:#111;
  font-weight:700;
  font-size:1.10rem;
  text-decoration:none;
  border:none;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  transition:
    transform .06s ease,
    background .15s ease,
    box-shadow .15s ease;
}

.arm-nav a:hover{
  background:#d4e0c6;
  color:#000;
  transform:translateY(-1px);
  box-shadow:0 6px 16px rgba(0,0,0,.12);
}

/* RIGHT-SIDE BUTTON GROUP */
.arm-contact-wrap{
  position:absolute;
  right:0;                  /* hug the right edge of the header container */
  top:0;                    /* align near top of row */
  transform:translateY(0);  /* no vertical shift */
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:8px;
}

/* Contact-style small buttons */
.arm-contact-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  height:32px;
  padding:0 10px;
  font-size:0.80rem;

  background:#a6bd97;
  color:#111;
  border-radius:6px;
  font-weight:600;
  text-decoration:none;
  border:2px solid #4b613a;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.arm-contact-btn:hover{
  background:#d4e0c6;
}

/* Sections / grids */
.arm-section{margin:22px 0}

.grid-2{
  display:grid;
  gap:20px;
  grid-template-columns:repeat(1,minmax(0,1fr));
}
@media (min-width:640px){
  .grid-2{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* Cards & placeholders */
.card{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,.06);
  padding:14px;
}
.ph{
  width:100%;
  height:320px;
  border-radius:10px;
  background:repeating-linear-gradient(
    45deg,
    #ededed,
    #ededed 10px,
    #f8f8f8 10px,
    #f8f8f8 20px
  );
}
.img-fit{
  width:100%;
  height:320px;
  object-fit:cover;
  border-radius:10px;
  display:block;
}
.card h3{margin:10px 0}

/* Generic buttons in content */
.btn{
  display:inline-block;
  padding:10px 16px;
  background:var(--od);
  color:#fff;
  text-decoration:none;
  border-radius:12px;
  font-weight:700;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.btn:hover{
  background:var(--hover);
  color:var(--ink);
}

/* Footer */
footer.arm-footer{
  margin:28px 0 0;
  padding:18px 0;
  border-top:1px solid rgba(0,0,0,.08);
  text-align:center;
  font-size:14px;
  color:rgba(0,0,0,.7);
  flex-shrink:0;
}

/* Safety: kill extra white block */
body > div:last-child{
  margin-bottom:0;
  padding-bottom:0;
  background:transparent;
}

/* WooCommerce product image styling */
.woocommerce div.product div.images{
  background:#fff;
  border:0.5px solid rgba(0,0,0,.12);
  border-radius:10px;
  box-shadow:0 2px 8px rgba(0,0,0,.04);

  padding:2px;
  max-width:360px;
  margin:0 auto;

  height:320px;
  display:flex;
  justify-content:center;
  align-items:center;
  box-sizing:border-box;
  overflow:hidden;
}

.woocommerce div.product div.images img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:8px;
  display:block;
}

/* ---------------------------------------------------------
   NEW-TAB ARROWS FOR HEADER BUTTONS (emoji version)
   --------------------------------------------------------- */

.newtab-link {
  position: relative !important;
  padding-right: 22px !important; /* room for arrow on right */
}

/* Curved arrow — white, vertically centered, right-aligned */
.newtab-link .newtab-arrow {
  position: absolute !important;
  right: 4px !important;      /* arrow hugs right side equally */
  top: 50% !important;
  transform: translateY(-50%) !important;

  font-size: 0.80rem;         /* clean size for curved arrow */
  color: #ffffff !important;  /* pure white */
  opacity: 0.9;
  margin: 0;
  line-height: 1;
}

.newtab-link:hover .newtab-arrow {
  opacity: 1;
}

/* Remove blue emoji background from ⤴ arrow */
.newtab-arrow {
  font-family: "Segoe UI Symbol", "Arial Unicode MS", sans-serif !important;
  background: transparent !important;
}

/* ---------------------------------------------------------
   NEW-TAB ARROWS FOR HEADER BUTTONS (CSS-DRAWN, NO EMOJI)
   --------------------------------------------------------- */

.newtab-link {
  position: relative !important;
  padding-right: 22px !important; /* room on right side for arrow */
}

/* Draw a small white "launch" style arrow in pure CSS */
.newtab-arrow {
  position: absolute !important;
  right: 4px !important;
  top: 50% !important;
  transform: translateY(-50%) rotate(-45deg) !important;

  width: 8px;
  height: 8px;
  border-right: 2px solid #ffffff; /* arrow line */
  border-top: 2px solid #ffffff;   /* arrow line */
  border-radius: 1px;
  background: transparent !important;
  content: "";
  display: block;
}

.newtab-link:hover .newtab-arrow {
  border-right-color: #ffffff;
  border-top-color: #ffffff;
}

/* ------------------------------------------
   SMALL PHONES & NARROW SCREENS (<= 600px)
-------------------------------------------*/
@media screen and (max-width: 600px) {

  /* Header: stack rows but keep nav first, policies second */
  .arm-header-row{
    flex-direction:column;
    align-items:stretch;
  }

  .arm-header-row nav{
    align-self:center;
  }

  .arm-contact-wrap{
    position:static;
    margin-top:8px;
    align-self:flex-end;
    justify-content:flex-end;
    padding-right:16px;
  }

  .arm-nav{
    flex-wrap:wrap;
  }

  /* Content padding */
  .arm-section{
    padding-left:10px;
    padding-right:10px;
  }

  /* Content images (not footer icons) */
  .arm-section img{
    max-width:100%;
    height:auto;
  }

  /* Default grids: collapse multi-column 2/4 grids to single column */
  .grid-2,
  .grid-4{
    grid-template-columns:1fr;
  }

  /* LIVE PAGE / ANY 4-UP GRID — force 2 per row on small phones */
  .grid-4{
    display:flex !important;
    flex-wrap:wrap !important;
    justify-content:center;
    gap:14px;
    max-width:600px;
    margin:0 auto;
  }

  .grid-4 > *{
    flex:0 0 48%;
  }

  /* Footer icons: wrap neatly & shrink on small phones */
  .ga-thumb{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:12px;
  }

  .ga-thumb img{
    height:70px !important;
    width:auto !important;
  }
}

/* EXTRA-SMALL PHONES (<= 400px): 4-up grids go to 1 per row */
@media screen and (max-width: 400px) {
  .grid-4 > *{
    flex:0 0 100%;
  }
}

/* ----------------------------------------
   LIVE PAGE – MOBILE LAYOUT FIX (v2)
   Force the 4-up grid to break on small screens,
   even when it uses inline grid styles.
----------------------------------------- */

/* Small phones: <= 600px */
@media (max-width: 600px) {

  /* Match ANY div that uses a 4-column repeat grid inline */
  div[style*="grid-template-columns:repeat(4"] {
    display: flex !important;      /* beat inline display:grid */
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }

  div[style*="grid-template-columns:repeat(4"] > a,
  div[style*="grid-template-columns:repeat(4"] > .card,
  div[style*="grid-template-columns:repeat(4"] > * {
    box-sizing: border-box;
    flex: 0 1 calc(50% - 14px);   /* 2 per row */
    max-width: calc(50% - 14px);
  }

  /* If your Live grid ALSO has a .grid-4 class, this covers that too */
  .grid-4 {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }

  .grid-4 > a,
  .grid-4 > .card,
  .grid-4 > * {
    box-sizing: border-box;
    flex: 0 1 calc(50% - 14px);
    max-width: calc(50% - 14px);
  }
}

/* Tiny phones: <= 400px — go single column */
@media (max-width: 400px) {
  div[style*="grid-template-columns:repeat(4"] > a,
  div[style*="grid-template-columns:repeat(4"] > .card,
  div[style*="grid-template-columns:repeat(4"] > *,
  .grid-4 > a,
  .grid-4 > .card,
  .grid-4 > * {
    flex: 0 1 100%;
    max-width: 100%;
  }
}

/* ----------------------------------------
   FOOTER IMAGE SIZING
----------------------------------------- */

.arm-footer .ga-thumb img {
  max-height: 90px;
  width: auto;
  height: auto;
}

/* On smaller screens, shrink them slightly */
@media (max-width: 600px) {
  .arm-footer .ga-thumb img {
    max-height: 70px;
  }
}

@media (max-width: 400px) {
  .arm-footer .ga-thumb img {
    max-height: 60px;
  }
}

/* ----------------------------------------
   HEADER & POLICY BUTTONS – MOBILE
----------------------------------------- */

@media (max-width: 768px) {

  .arm-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .arm-header .arm-nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 6px;
  }

  .arm-header .arm-nav a {
    flex: 0 1 auto;
  }

  /* Policy buttons on their own centered row */
  .arm-header .arm-header-policies {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 2px;
  }
}

/* ======================================================
   VIEW CART TEXT LINK – MAKE IT BIGGER & EASIER TO SEE
   Works for:
   - Plain "View Cart" links inside paragraphs
   - The [arm_view_cart_link] shortcode (.arm-view-cart-link)
====================================================== */

.arm-section p a[href*="/cart"],
.entry-content p a[href*="/cart"],
.arm-view-cart-link {
  font-size: 22px;
  font-weight: 600;
}
/* Make the footer "View Cart" link bigger */
.arm-footer a[href*="cart"] {
  font-size: 22px !important;
  font-weight: 600;
}
/* FOOTER VIEW CART LINK – MAKE IT BIGGER */
.footer-cart-btn {
  font-size: 22px !important;
  font-weight: 700 !important;
}
.arm-header-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
}

/* Make sure the left cart button hugs the left side */
.arm-cart-link {
  margin-right:auto;
}
