/*
Theme Name: Epilora
Theme URI: https://epilora.shop
Author: Kavi for ismail
Description: A light, fast, Elementor-friendly WooCommerce theme built for Epilora. No forced layouts: every page and product can hide the header, the footer or the title, go full width, or render as a pure Elementor canvas. Product pages are a tight photo -> title -> price -> order-form stack on mobile by design.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: epilora-kavi
*/

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Nothing may ever widen the page: no sideways scrolling, no white side gap. */
html, body { overflow-x: hidden; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
  color: #17131f;
  background: #fff;
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; height: auto; }
a { color: #6600cc; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

.ep-container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.ep-main { padding: 28px 0 40px; }
.ep-main--fluid { padding: 0; }
.ep-main--fluid .ep-container { max-width: none; padding: 0; }
.ep-page-title { font-size: 28px; margin: 0 0 18px; }

/* ============ Header ============ */
.ep-header { background: #fff; position: relative; z-index: 60; }
.ep-header-main { display: flex; align-items: center; gap: 18px; padding: 10px 0; }
.ep-logo { flex: 0 0 auto; display: flex; align-items: center; }
.ep-logo img { max-height: 74px; width: auto; display: block; }
.ep-logo .ep-site-name { font-size: 24px; font-weight: 800; color: #17131f; }
.ep-header-search { flex: 1 1 auto; max-width: 560px; margin: 0 auto; }
.ep-header-search form { display: flex; border: 2px solid #6600cc; border-radius: 999px; overflow: hidden; background: #fff; }
.ep-header-search input[type="search"] { flex: 1; border: 0; padding: 9px 16px; font: inherit; outline: none; min-width: 0; }
.ep-header-search button { border: 0; background: #6600cc; color: #fff; padding: 0 20px; font: inherit; font-weight: 700; cursor: pointer; }
.ep-header-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 16px; }
.ep-header-actions a { color: #17131f; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.ep-header-actions svg { width: 24px; height: 24px; }
.ep-cart-link .ep-cart-count { background: #6600cc; color: #fff; border-radius: 999px; min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; padding: 0 5px; }

/* Magenta nav bar */
.ep-nav { background: #6600cc; position: sticky; top: 0; z-index: 59; }
.ep-nav-inner { display: flex; align-items: center; }
.ep-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.ep-menu li { margin: 0; }
.ep-menu a { display: block; color: #fff; padding: 11px 16px; font-weight: 700; font-size: 15px; }
.ep-menu a:hover { background: rgba(255,255,255,.14); text-decoration: none; }
.ep-burger { display: none; background: none; border: 0; color: #17131f; padding: 6px; cursor: pointer; align-items: center; }
.ep-burger svg { width: 26px; height: 26px; }
.ep-search-row { display: none; background: #fff; padding: 0 0 12px; }
.ep-search-row .ep-header-search { max-width: none; margin: 0; }
.ep-mobile-panel { display: none; background: #fff; border-bottom: 3px solid #6600cc; padding: 12px 0 16px; }
.ep-mobile-panel.open { display: block; }
.ep-mobile-panel .ep-menu { flex-direction: column; }
.ep-mobile-panel .ep-menu a { color: #17131f; padding: 10px 2px; border-bottom: 1px solid #e7dcf7; }
.ep-mobile-panel .ep-header-search { max-width: none; margin-top: 12px; }

/* ============ Footer ============ */
.ep-footer { background: linear-gradient(180deg, #6a00d6, #4a00a0); color: #efe7ff; margin-top: 0; }
.ep-footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; padding: 36px 0 26px; }
.ep-footer h3, .ep-footer h4 { color: #fff; font-size: 18px; margin-bottom: 12px; }
.ep-footer .ep-brand-name { font-size: 22px; font-weight: 800; color: #fff; }
/* Footer accordions: expanded on desktop, collapsible on mobile. */
.ep-acc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; background: none; border: 0; padding: 0; margin: 0 0 12px; color: #fff; font: inherit; font-size: 18px; font-weight: 700; text-align: start; cursor: pointer; }
.ep-acc-chev { display: none; width: 20px; height: 20px; flex: 0 0 auto; transition: transform .25s ease; }
.ep-footer ul { list-style: none; margin: 0; padding: 0; }
.ep-footer li { margin-bottom: 8px; }
.ep-footer a { color: #efe7ff; }
.ep-footer a:hover { color: #fff; }
.ep-footer-bottom { border-top: 1px solid rgba(255,255,255,.16); padding: 14px 0; text-align: center; font-size: 14px; }

/* ============ Buttons / Woo general ============ */
.button, button.button, a.button, input[type="submit"].button {
  background: #6600cc; color: #fff !important; border: 0; border-radius: 10px;
  padding: 11px 22px; font: inherit; font-weight: 800; cursor: pointer; display: inline-block; text-align: center;
}
.button:hover, a.button:hover { background: #4a00a0; text-decoration: none; }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button { background: #6600cc; color: #fff; }
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover { background: #4a00a0; color: #fff; }
.woocommerce .woocommerce-message, .woocommerce .woocommerce-info {
  border-top-color: #6600cc; background: #f6efff;
}
.woocommerce .woocommerce-message::before, .woocommerce .woocommerce-info::before { color: #6600cc; }
.price { color: #6600cc; font-weight: 800; }
.price del { color: #8a8296; font-weight: 400; }
.price ins { text-decoration: none; }
span.onsale {
  background: #6600cc !important; color: #fff; border-radius: 999px !important;
  min-height: 0 !important; min-width: 0 !important; line-height: 1.4 !important;
  padding: 3px 10px !important; font-size: 13px; top: 10px !important; inset-inline-start: 10px !important;
}

/* ============ Shop grid ============ */
.woocommerce ul.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 0; padding: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product { float: none !important; width: auto !important; margin: 0 !important; background: #fff; border: 1px solid #e7dcf7; border-radius: 14px; overflow: hidden; padding-bottom: 14px; text-align: center; }
.woocommerce ul.products li.product a img { margin: 0 0 10px; width: 100%; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 16px; padding: 0 10px; color: #17131f; }
.woocommerce ul.products li.product .price { display: block; margin-bottom: 10px; }
.woocommerce ul.products li.product .button { margin: 0 10px; padding: 9px 14px; font-size: 14px; background: #6600cc; color: #fff; }
@media (min-width: 900px) {
  .woocommerce ul.products { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .woocommerce ul.products.columns-3 { grid-template-columns: repeat(3, 1fr); }
  .woocommerce ul.products.columns-2 { grid-template-columns: repeat(2, 1fr); }
}
.woocommerce .woocommerce-ordering select { padding: 8px; border-radius: 8px; border: 1px solid #d9c8f5; font: inherit; }
.woocommerce nav.woocommerce-pagination { margin-top: 24px; }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span { padding: 8px 13px; }
.woocommerce nav.woocommerce-pagination ul li span.current { background: #6600cc; color: #fff; }

/* ============ Single product: tight stack by design ============ */
.single-product div.product { display: grid; grid-template-columns: 1fr; gap: 12px; }
.single-product div.product .woocommerce-product-gallery { width: 100% !important; float: none !important; margin: 0; }
.single-product div.product .summary { width: 100% !important; float: none !important; margin: 0; }
.single-product .product_title { font-size: 24px; margin: 0 0 6px; }
.single-product div.product p.price, .single-product div.product span.price { font-size: 22px; margin: 0 0 10px; }
.single-product .woocommerce-product-details__short-description { margin-bottom: 10px; }
.single-product div.product .woocommerce-tabs { grid-column: 1 / -1; margin-top: 6px; }
.single-product div.product .related, .single-product div.product .upsells { grid-column: 1 / -1; }
.single-product .woocommerce-tabs ul.tabs { padding: 0; margin: 0 0 14px; border: 0; }
.single-product .woocommerce-tabs ul.tabs::before { display: none; }
.single-product .woocommerce-tabs ul.tabs li { border: 0; background: #f6efff; border-radius: 999px; margin: 0 0 0 6px; }
.single-product .woocommerce-tabs ul.tabs li.active { background: #6600cc; }
.single-product .woocommerce-tabs ul.tabs li.active a { color: #fff; }
.single-product .woocommerce-tabs ul.tabs li::before, .single-product .woocommerce-tabs ul.tabs li::after { display: none; }
.single-product .woocommerce-tabs .panel { margin: 0; }
.single-product .woocommerce-tabs .panel img { display: block; margin: 0 auto 12px; }
@media (min-width: 900px) {
  .single-product div.product { grid-template-columns: 1fr 1fr; gap: 28px; }
  .single-product .product_title { font-size: 30px; }
}

/* ============ Cart / checkout ============ */
.woocommerce table.shop_table { border-radius: 12px; overflow: hidden; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  border: 1px solid #d9c8f5; border-radius: 10px; padding: 11px 12px; font: inherit; background: #fff;
}
.woocommerce-checkout #payment { background: #f6efff; border-radius: 12px; }
.woocommerce .quantity .qty { padding: 8px; border-radius: 8px; border: 1px solid #d9c8f5; }

/* ============ Blog / generic ============ */
.ep-post { margin-bottom: 28px; }
.ep-post h2 { font-size: 22px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ============ Mobile header ============ */
@media (max-width: 899px) {
  /* One-row mobile header: menu button at the start (right in RTL),
     logo centred, search + cart at the end (left in RTL). */
  .ep-header-main { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; padding: 8px 0; }
  .ep-burger { display: inline-flex; }
  .ep-logo { justify-self: center; }
  .ep-logo img { max-height: 52px; }
  .ep-header-main .ep-header-search { display: none; }
  /* Search is a full-width line under the header row, always visible. */
  .ep-search-row { display: block; padding: 2px 0 12px; }
  .ep-nav { display: none; }
  .ep-footer-cols { grid-template-columns: 1fr; gap: 20px; padding: 28px 0 18px; }
  /* Footer: clear title -> subtitle list hierarchy. */
  .ep-footer h4, .ep-footer .ep-brand-name, .ep-footer .ep-acc-head { font-size: 20px; margin-bottom: 10px; }
  .ep-footer li { margin-bottom: 0; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.10); }
  .ep-footer li:last-child { border-bottom: 0; }
  /* Footer accordions collapsed by default on mobile: shorter footer. */
  .ep-acc-chev { display: block; }
  .ep-acc-body { display: none; }
  .ep-acc.open .ep-acc-body { display: block; }
  .ep-acc.open .ep-acc-chev { transform: rotate(180deg); }
  .ep-main { padding: 16px 0 28px; }
  .ep-page-title { font-size: 23px; }
  /* Large description pictures run edge to edge (the theme's JS marks
     them .ep-bleed); the container's 16px side padding is cancelled. */
  .single-product .woocommerce-tabs .panel img.ep-bleed {
    width: calc(100% + 32px); max-width: none;
    margin-left: -16px; margin-right: -16px; margin-bottom: 12px;
  }
}
