/*
 Theme Name:   gtr
 Theme URI:    https://example.com/
 Description:  Child theme for Botiga with a modern green & black design, mobile slide-in menu, product mega menu and 2-column sticky checkout.
 Author:       projetodigital.pt
 Author URI:   https://projetodigital.pt
 Template:     botiga
 Version:      1.0.0
 Text Domain:  gtr
*/

/* ----------------------------------------------------------
   NOTE: Best practice is to enqueue the parent & child styles
   via functions.php using wp_enqueue_style(). If you prefer
   @import, uncomment the line below (not recommended).
----------------------------------------------------------- */
/* @import url("../botiga/style.css"); */

/* ----------------------------------------------------------
   CSS VARIABLES (branding)
----------------------------------------------------------- */
:root{
  --brand-red: #e53935;
  --brand-red-dark: #a21613;
  --brand-black: #1a1a1a;
  --text-color: #222222;
  --muted: #999999;
  --bg: #ffffff;
  --radius: 8px;
  --transition-fast: 0.18s;
  --transition: 0.3s;
  --max-content-width: 1200px;
}

/* ----------------------------------------------------------
   TYPOGRAPHY
   (Enqueue Google fonts via functions.php for best perf.)
----------------------------------------------------------- */
body, p, li, span {
  font-family: 'Montserrat', sans-serif;
  color: var(--text-color);
  line-height: 1.65;
  font-size: 16px;
}

h1,h2,h3,h4,h5,h6, .site-title, .entry-title {
  font-family: 'Roboto', sans-serif;
  color: var(--brand-black);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.6em;
}

/* Small helpers */
.container {
  max-width: var(--max-content-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ----------------------------------------------------------
   LINKS & BUTTONS
----------------------------------------------------------- */
a, a:visited { color: var(--brand-red); transition: color var(--transition); }
a:hover { color: var(--brand-red-dark); }

/* Primary buttons */
button, .button, .btn, .woocommerce a.button, .woocommerce button.button {
  background: var(--brand-red);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  padding: 12px 22px;
  font-weight: 600;
  transition: transform var(--transition-fast), background var(--transition-fast);
}
button:hover, .button:hover { transform: translateY(-2px); background: var(--brand-red-dark); }

/* Ghost / secondary */
.button.alt, .woocommerce a.button.alt {
  background: transparent;
  border: 2px solid var(--brand-red);
  color: var(--brand-red);
}
.button.alt:hover { background: var(--brand-red); color: #fff; }


/* ----------------------------------------------------------
   ADITIONAL CSS
----------------------------------------------------------- */


.pswp--open {
    display: block;
    z-index: 9999;
}
.g-1, .g, .g-single {
  text-align: center;
}
.g-single, .a-6  {
  text-align: -webkit-center !important;
}
#order_review_heading {
    display: none!important;
}
.woocommerce-checkout .checkout-wrapper {
    display: block!important;
	width:100%!important
}
.woocommerce ul.products li.product {
border: 0px!important;
}
ul.products li.product .woocommerce-loop-category__title {
    text-transform:uppercase;
}
ul.products li.product .botiga-wc-loop-product__title {
    text-transform:uppercase;
}
.astm-search-menu-wrapper, is-menu-wrapper {
    display: none!important;
}
.product-gallery-summary .product_title {
    text-transform: uppercase;
	font-size:32px;
}
.elementor-button-text {
	color: #ffffff!important;
		font-weight:700
}
.wc_ps_sidebar_container .wc_ps_nav_field .wc_ps_search_keyword {
	font: 16px/1.4em Arial,sans-serif !important;
	color: #111 !important;
	padding: 0px 12px 12px 12px!important;
}

/* ----------------------------------------------------------
   HEADER - desktop & sticky
----------------------------------------------------------- */
.site-header, .main-header {
  background: var(--bg);
  border-bottom: 1px solid #ececec;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  position: relative;
  z-index: 1000;
  transition: box-shadow var(--transition), padding var(--transition);
  padding: 14px 0;
}

.site-branding img { max-height: 70px; transition: max-height var(--transition); }

/* Shrink header on sticky */
.site-header.is-sticky {
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  padding: 8px 0;
}
.site-header.is-sticky .site-branding img { max-height: 48px; }

/* Navigation */
.main-navigation { display: flex; align-items: center; gap: 6px; }
.main-navigation a {
  font-family: 'Roboto', sans-serif;
  color: var(--brand-black);
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  background: rgba(0,153,51,0.08);
  color: var(--brand-red);
}

/* header icons (search, account, cart) */
.header-icons { display: flex; gap: 14px; align-items: center; }
.header-icons a { color: var(--brand-black); transition: color var(--transition); }
.header-icons a:hover { color: var(--brand-red); }

/* cart bubble */
.header-icons .cart-contents .count {
  background: var(--brand-red);
  color: #fff;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  margin-left: 6px;
}

/* ----------------------------------------------------------
   MOBILE MENU - slide-in from RIGHT (A1)
----------------------------------------------------------- */
/* Toggle / hamburger visible on small screens */
.header-toggle {
  display: none;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 8px;
}

/* Slide panel */
.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  max-width: 80%;
  height: 100vh;
  background: #fff;
  box-shadow: -18px 0 40px rgba(0,0,0,0.12);
  z-index: 2000;
  transition: right 0.35s cubic-bezier(.2,.9,.3,1);
  overflow-y: auto;
  padding: 20px;
}

/* open state */
.mobile-menu-panel.open { right: 0; }

/* close button */
.mobile-menu-panel .close-mobile {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.mobile-menu-panel .close-mobile button {
  background: transparent; border: 0; font-size: 22px; cursor: pointer;
}

/* mobile nav items */
.mobile-menu-panel nav ul { list-style: none; padding: 0; margin: 0; }
.mobile-menu-panel nav li { margin: 6px 0; border-bottom: 1px solid #f2f2f2; }
.mobile-menu-panel nav a { display: block; padding: 12px 6px; color: var(--brand-black); font-weight: 600; }

/* utility at top - search + account + cart */
.mobile-menu-panel .mobile-top { display:flex; gap:10px; align-items:center; margin-bottom:14px; }

/* overlay behind menu */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 1990;
}
.mobile-menu-overlay.show { opacity: 1; visibility: visible; }

/* Show hamburger at <= 992px */
@media (max-width: 992px) {
  .main-navigation { display: none; }
  .header-toggle { display: inline-flex; }
}

/* ----------------------------------------------------------
   MEGA MENU - Product-focused with images & CTA (C2)
----------------------------------------------------------- */
/* container for mega */
.main-navigation .menu-item-has-children { position: relative; }
.main-navigation .mega-menu {
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  max-width: var(--max-content-width);
  background: #fff;
  padding: 28px 20px;
  display: none;
  box-shadow: 0 16px 36px rgba(0,0,0,0.08);
  border-top: 4px solid rgba(0,0,0,0.03);
  z-index: 1500;
}

/* show on hover (desktop) */
.main-navigation .menu-item-has-children:hover > .mega-menu { display: block; }

/* mega grid */
.mega-menu .mega-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 340px;
  gap: 20px;
  align-items: start;
}

/* product column */
.mega-menu .mega-product {
  display: flex;
  gap: 12px;
  align-items: center;
}
.mega-menu .mega-product img {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
}

/* product info */
.mega-menu .mega-product .title {
  font-weight: 700;
  font-family: 'Roboto', sans-serif;
  color: var(--brand-black);
}
.mega-menu .mega-product .price {
  color: var(--brand-red);
  font-weight: 700;
}

/* CTA / promo column (rightmost) */
.mega-menu .mega-cta {
  background: linear-gradient(180deg, rgba(0,153,51,0.06), rgba(0,153,51,0.02));
  padding: 18px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mega-menu .mega-cta .heading { font-weight: 800; font-family: 'Roboto', sans-serif; color: var(--brand-black); }
.mega-menu .mega-cta .sub { color: var(--muted); }

/* recommended products grid (within mega menu) */
.mega-menu .recommended {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* small product card inside mega */
.mega-menu .card {
  border: 1px solid #f1f1f1;
  padding: 8px;
  border-radius: 8px;
  display:flex;
  gap:8px;
  align-items:center;
}

/* Responsive adjustments for mega menu */
@media (max-width: 1200px) {
  .mega-menu .mega-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 992px) {
  .mega-menu { position: static; display:block; padding: 12px 10px; box-shadow:none; }
  .main-navigation .menu-item-has-children > a::after { content: ' ▾'; font-size: 12px; }
}

/* ----------------------------------------------------------
   PRODUCTS / SHOP LOOP - tweaks
----------------------------------------------------------- */
.woocommerce ul.products li.product {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 12px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.woocommerce ul.products li.product:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}

/* price accent */
.woocommerce .price { color: var(--brand-red); font-weight: 700; }

/* ----------------------------------------------------------
   CHECKOUT - 2-column sticky order summary (D3)
----------------------------------------------------------- */
.woocommerce-checkout .checkout-wrapper {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

/* left column (form) */
.woocommerce-checkout .checkout-form {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
}

/* right column (order summary) */
.woocommerce-checkout .order-summary {
  position: relative;
}

/* sticky summary */
.woocommerce-checkout .order-summary .summary-inner {
  position: sticky;
  top: 88px;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #eee;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}

/* on small screens, stack */
@media (max-width: 992px) {
  .woocommerce-checkout .checkout-wrapper { grid-template-columns: 1fr; }
  .woocommerce-checkout .order-summary .summary-inner { position: relative; top: auto; margin-top: 18px; }
}

/* checkout buttons */
.woocommerce-checkout .place-order .button {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  border-radius: 8px;
}

/* input styles */
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout select,
.woocommerce-checkout textarea {
  border-radius: 8px;
  border: 1px solid #e6e6e6;
  padding: 12px;
}
.woocommerce-checkout input:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 4px rgba(0,153,51,0.06);
}

/* ----------------------------------------------------------
   FOOTER - premium black with green accents
----------------------------------------------------------- */
.site-footer {
  background: var(--brand-black);
  color: #d8d8d8;
  padding: 60px 0 28px;
  font-family: 'Montserrat', sans-serif;
}

/* footer titles underline accent */
.site-footer .widget-title {
  color: #fff;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
}
.site-footer .widget-title:after {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  background: var(--brand-red);
  margin-top: 8px;
  border-radius: 3px;
}

/* footer links */
.site-footer a { color: #d8d8d8; transition: color var(--transition); }
.site-footer a:hover { color: var(--brand-red); transform: translateX(3px); }

/* bottom bar */
.site-footer .site-info {
  border-top: 1px solid #1b1b1b;
  margin-top: 30px;
  padding-top: 18px;
  text-align: center;
  color: #9a9a9a;
  font-size: 14px;
}

/* ----------------------------------------------------------
   UTILITY / RESPONSIVE
----------------------------------------------------------- */
@media (max-width: 768px) {
  .site-branding img { max-height: 58px; }
  .mobile-only { display: block; }
}

@media (min-width: 769px) {
  .mobile-only { display: none; }
}

/* small tweaks for accessibility and spacing */
.skip-to-content { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-to-content:focus { left: 10px; top: 10px; width: auto; height: auto; background: #fff; padding: 8px; z-index: 9999; }

/* End of stylesheet */
