/*
Theme Name: AiGentic Shop
Theme URI: https://ikaros.pro
Author: AiGentic
Description: Increased Side Padding + Auto-Fit Grid + Mobile Fixes.
Version: 6.5
*/

:root {
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --accent: #22d3ee;
  --font-main: 'Inter', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: 0.3s;
}

a:hover {
  opacity: 0.8;
}

/* --- GLOBAL WRAPPERS & SPACING --- */
.global-wrapper,
.header-inner,
.woocommerce-container,
.aigentic-main-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;

  /* STEP 1: INCREASED PADDING FOR DESKTOP */
  padding-left: 60px;
  padding-right: 60px;
}

.woocommerce-container,
.aigentic-main-wrapper {
  padding-top: 40px;
  padding-bottom: 60px;
}

/* STEP 2: KEEP MOBILE PADDING SMALLER */
@media (max-width: 768px) {

  .global-wrapper,
  .header-inner,
  .woocommerce-container,
  .aigentic-main-wrapper {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* --- HEADER --- */
body.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

.site-header {
  padding: 15px 0;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom-logo-link img {
  max-height: 95px;
  width: auto;
}

.site-title a {
  color: #fff;
  font-size: 1.5rem;
  font-weight: bold;
}

/* --- MENU --- */
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px 15px;
  border-radius: 6px;
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 30px;
}

.main-navigation ul li {
  position: relative;
}

.main-navigation a {
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.95rem;
  display: block;
  padding: 10px 0;
}

.main-navigation a:hover {
  color: var(--accent);
}

/* Desktop Arrow */
.menu-item-has-children>a::after {
  content: ' ▾';
  font-size: 0.8em;
  margin-left: 5px;
  opacity: 0.7;
}

/* Desktop Submenu */
.main-navigation ul ul {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  width: 220px;
  flex-direction: column;
  gap: 0;
  padding: 10px 0;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
}

.main-navigation ul li:hover>ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-navigation ul ul a {
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Hide Mobile Toggle on Desktop */
.submenu-toggle {
  display: none;
}

/* --- MOBILE MENU --- */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #020617;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    z-index: 999;
    max-height: 80vh;
    overflow-y: auto;
  }

  .main-navigation.toggled {
    display: block;
  }

  .main-navigation ul {
    flex-direction: column;
    gap: 0;
    text-align: left;
  }

  .main-navigation a {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: inline-block;
    width: 85%;
  }

  .menu-item-has-children>a::after {
    display: none;
  }

  .submenu-toggle {
    display: inline-block;
    float: right;
    width: 15%;
    text-align: center;
    padding: 12px 0;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--accent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .main-navigation ul ul {
    display: none;
    position: static;
    visibility: visible;
    opacity: 1;
    transform: none;
    background: rgba(255, 255, 255, 0.03);
    width: 100%;
    padding-left: 20px;
    margin: 0;
  }

  .main-navigation ul li.active>ul {
    display: block;
  }
}

/* =========================================================
   1. SHOP ARCHIVE PAGE
   ========================================================= */

/* Center Title and add spacing */
.woocommerce-products-header,
.page-title {
  text-align: center;
  margin-bottom: 40px;
  width: 100%;
}

.woocommerce-products-header__title,
h1.page-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 auto;
  line-height: 1.2;
  display: block;
}

/* Sorting & Result Count */
.woocommerce-result-count,
.woocommerce-ordering {
  float: none !important;
  text-align: center;
  margin: 0 auto 30px auto;
  display: block;
  width: 100%;
}

.woocommerce-ordering select {
  padding: 10px;
  border-radius: 6px;
  background: var(--bg-card);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* --- RESET DEFAULT WOOCOMMERCE STYLES --- */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.woocommerce ul.products[class*=columns-] li.product,
.woocommerce-page ul.products[class*=columns-] li.product {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  clear: none !important;
}

/* THE GRID SYSTEM (Auto-Fit removes empty space) */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap: 30px !important;
  padding: 0 !important;
  margin: 0 0 50px 0 !important;
  width: 100% !important;
}

/* FORCE 1 COLUMN ON MOBILE */
@media (max-width: 768px) {
  .woocommerce ul.products {
    grid-template-columns: 1fr !important;
  }
}

/* Product Card */
.woocommerce ul.products li.product {
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease;
  list-style: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

  /* Ensure card FILLS the grid cell (Fixes empty space) */
  display: flex !important;
  flex-direction: column;
  width: 100% !important;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.woocommerce ul.products li.product img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 1.3rem;
  color: #fff;
  margin: 10px 0;
  padding: 0;
  line-height: 1.4;
}

.woocommerce ul.products li.product .price {
  display: block;
  color: var(--accent);
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.woocommerce ul.products li.product .button {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 12px 20px;
  border-radius: 4px;
  display: inline-block;
  width: 100%;
  font-weight: 600;
  transition: all 0.2s;
  margin-top: auto;
}

.woocommerce ul.products li.product .button:hover {
  background: var(--accent);
  color: #0f172a;
}

/* =========================================================
   2. SINGLE PRODUCT PAGE
   ========================================================= */
.single-product div.product {
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 80px;
  margin-bottom: 50px;
  display: flex !important;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.single-product div.product div.images,
.single-product div.product .woocommerce-product-gallery,
.single-product div.product div.summary {
  flex: 0 0 48%;
  max-width: 48%;
  width: 48% !important;
  margin-bottom: 0;
}

/* Mobile Stack */
@media (max-width: 768px) {
  .single-product div.product {
    display: block !important;
    padding: 20px;
  }

  .single-product div.product div.images,
  .single-product div.product .woocommerce-product-gallery,
  .single-product div.product div.summary {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100%;
    margin-bottom: 30px;
  }
}

.single-product .product_title {
  font-size: 2.2rem;
  color: #fff;
  margin-bottom: 15px;
}

.single-product p.price {
  font-size: 1.8rem;
  color: var(--accent);
  font-weight: bold;
}

.single-product .single_add_to_cart_button {
  background: transparent !important;
  border: 1px solid var(--accent) !important;
  color: var(--accent) !important;
  font-weight: 700;
  padding: 15px;
  width: 100%;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 15px;
  transition: 0.2s;
}

.single-product .single_add_to_cart_button:hover {
  background: var(--accent) !important;
  color: #0f172a !important;
}

/* =========================================================
   3. DETAILS & RESTORED ELEMENTS
   ========================================================= */
.woocommerce-product-details__short-description {
  color: var(--text-muted);
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 20px;
}

.woocommerce-product-details__short-description p {
  color: var(--text-muted);
}

.quantity .qty {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 12px;
  border-radius: 6px;
  margin-right: 15px;
  width: 80px;
  text-align: center;
}

.cart {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.woocommerce-tabs {
  width: 100%;
  flex: 0 0 100%;
  margin-top: 50px;
}

.woocommerce-tabs ul.tabs {
  padding: 0;
  margin: 0 0 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 20px;
}

.woocommerce-tabs ul.tabs li {
  list-style: none;
  background: transparent;
  border: none;
}

.woocommerce-tabs ul.tabs li a {
  color: var(--text-muted);
  font-weight: 600;
  padding-bottom: 10px;
  display: block;
}

.woocommerce-tabs ul.tabs li.active a {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

.woocommerce-tabs .panel {
  color: var(--text-muted);
}

/* HERO */
.post-hero {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  height: 90vh;
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 60px;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.9));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 0 20px;
  color: #fff;
}

.entry-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin: 25px 0;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  line-height: 1.1;
}

.boxed-meta a {
  display: inline-block;
  background: #22d3ee;
  color: #0f172a !important;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 10px;
  box-shadow: 0 4px 15px rgba(34, 211, 238, 0.4);
}

.boxed-tags a {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  color: #fff !important;
  padding: 6px 12px;
  border-radius: 4px;
  margin: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 40px;
  margin-bottom: 50px;
}

.blog-card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s;
}

.blog-card:hover {
  transform: translateY(-5px);
}

.post-thumbnail img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.card-content {
  padding: 25px;
}

.meta-cat {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

/* Footer */
.site-footer {
  padding: 40px 20px;
  background: #020617;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  color: #64748b;
  margin-top: auto;
}
/* --- FOOTER MENU STYLES --- */
.site-footer {
    padding: 40px 20px;
    background: #020617;
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
    color: #64748b;
    margin-top: auto;
}

.footer-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-navigation ul li {
    display: inline-block;
}

.footer-navigation a {
    color: #94a3b8;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-navigation a:hover {
    color: var(--accent);
}