/*
Theme Name: Oshea Store
Theme URI: https://osheacosmetics.com
Author: Oshea
Description: قالب ووردبريس مخصص لمتجر أوشيا - نسخة مطابقة لتصميم المتجر الأصلي مع نموذج طلب بالدفع عند الاستلام (WooCommerce).
Version: 1.2.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: oshea
*/

:root {
  --oshea-primary: #000000;
  --oshea-text: #1a1a1a;
  --oshea-muted: #7a7a7a;
  --oshea-card: #f7f7f8;
  --oshea-border: #ececec;
  --oshea-radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Almarai', Tahoma, Arial, sans-serif;
  color: var(--oshea-text);
  background: #fff;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: .8; }

.oshea-container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.oshea-header {
  background: #fff;
  border-bottom: 1px solid var(--oshea-border);
  position: sticky; top: 0; z-index: 50;
}
.oshea-header-inner {
  display: flex; align-items: center; gap: 24px;
  min-height: 56px;
}
.oshea-logo img { height: 34px; width: auto; max-width: none; display: block; }
.oshea-logo .oshea-logo-text { font-size: 22px; font-weight: 800; }
.oshea-nav { display: flex; gap: 22px; font-size: 13px; }
.oshea-nav a { color: #222; }
.oshea-header-icons { margin-right: auto; display: flex; align-items: center; gap: 14px; }
.oshea-icon-btn {
  background: none; border: 0; cursor: pointer; padding: 4px;
  position: relative; color: #222; display: inline-flex;
}
.oshea-icon-btn svg { width: 21px; height: 21px; }
.oshea-cart-count {
  position: absolute; top: -6px; left: -6px;
  background: #000; color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 50%; min-width: 16px; height: 16px; line-height: 16px;
  text-align: center; padding: 0 2px;
}
.oshea-burger { display: none; background: none; border: 0; cursor: pointer; padding: 4px; color: #222; }
.oshea-mobile-menu {
  display: none; flex-direction: column; border-top: 1px solid var(--oshea-border);
  background: #fff;
}
.oshea-mobile-menu.open { display: flex; }
.oshea-mobile-menu a {
  padding: 13px 18px; border-bottom: 1px solid var(--oshea-border);
  font-size: 14px; font-weight: 700;
}
.oshea-search-bar { display: none; border-top: 1px solid var(--oshea-border); padding: 10px 0; }
.oshea-search-bar.open { display: block; }
.oshea-search-bar form { display: flex; gap: 8px; }
.oshea-search-bar input[type="search"] {
  flex: 1; border: 1px solid var(--oshea-border); border-radius: 6px;
  padding: 9px 12px; font-family: inherit; font-size: 14px;
}
.oshea-search-bar button {
  background: #000; color: #fff; border: 0; border-radius: 6px;
  padding: 9px 18px; font-family: inherit; cursor: pointer;
}

/* ---------- Hero slider ---------- */
.oshea-hero { padding: 24px 0 8px; }
.oshea-hero-track { position: relative; overflow: hidden; border-radius: var(--oshea-radius); }
.oshea-slide { display: none; }
.oshea-slide.active { display: block; }
.oshea-slide img { width: 100%; display: block; border-radius: var(--oshea-radius); }
.oshea-hero-dots { text-align: center; margin-top: 10px; }
.oshea-hero-dots button {
  width: 8px; height: 8px; border-radius: 50%; border: 0; margin: 0 3px;
  background: #d5d5d5; cursor: pointer; padding: 0;
}
.oshea-hero-dots button.active { background: #000; }

/* ---------- Sections ---------- */
.oshea-section { padding: 34px 0 10px; }
.oshea-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.oshea-section-title { font-size: 26px; font-weight: 800; margin: 0; }
.oshea-more { font-size: 13px; color: #444; }

/* ---------- Product cards (vertical) ---------- */
.oshea-grid-featured {
  display: grid; grid-template-columns: 1fr 1fr 2fr; grid-auto-rows: auto;
  gap: 16px;
}
.oshea-grid-featured .oshea-card-big { grid-column: 3; grid-row: 1 / span 2; }
.oshea-card {
  border: 1px solid var(--oshea-border); border-radius: var(--oshea-radius);
  padding: 10px; background: #fff; display: flex; flex-direction: column;
}
.oshea-card-thumb {
  background: var(--oshea-card); border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1;
}
.oshea-card-big .oshea-card-thumb { aspect-ratio: auto; flex: 1; min-height: 320px; }
.oshea-card-thumb img { object-fit: contain; max-height: 100%; mix-blend-mode: multiply; }
.oshea-card-meta {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; padding: 10px 4px 2px; font-size: 14px; font-weight: 700;
}
.oshea-card-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oshea-card-price { white-space: nowrap; }

/* ---------- Product cards (horizontal) ---------- */
.oshea-grid-h { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.oshea-card-h {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--oshea-card); border-radius: var(--oshea-radius); overflow: hidden;
  min-height: 92px; padding-right: 14px;
}
.oshea-card-h-info { padding: 12px 0; }
.oshea-card-h-name { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.oshea-card-h-price { font-size: 13px; font-weight: 800; }
.oshea-card-h-thumb { width: 92px; height: 92px; flex: 0 0 92px; background: #fff; }
.oshea-card-h-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }

/* ---------- Single product ---------- */
.oshea-product { display: grid; grid-template-columns: 1fr 1.05fr; gap: 34px; padding: 34px 0 60px; }
.oshea-gallery-main {
  background: var(--oshea-card); border-radius: var(--oshea-radius);
  display: flex; align-items: center; justify-content: center;
  min-height: 380px; padding: 18px;
}
.oshea-gallery-main img { max-height: 430px; object-fit: contain; mix-blend-mode: multiply; }
.oshea-gallery-thumbs { display: flex; gap: 10px; margin-top: 14px; justify-content: center; flex-wrap: wrap; }
.oshea-gallery-thumbs button {
  width: 62px; height: 62px; border: 1px solid var(--oshea-border); border-radius: 8px;
  background: var(--oshea-card); cursor: pointer; padding: 4px;
}
.oshea-gallery-thumbs button.active { border-color: #000; }
.oshea-gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }

.oshea-product-title { font-size: 26px; font-weight: 800; margin: 0 0 6px; }
.oshea-product-price { font-size: 22px; font-weight: 400; color: #333; margin-bottom: 16px; }
.oshea-product-price .amount { font-weight: 800; }
.oshea-buy-row { display: flex; gap: 10px; margin-bottom: 20px; }
.oshea-buy-top {
  display: block; flex: 1.4; background: #e9e9e9; color: #555;
  text-align: center; border: 0; border-radius: 6px; padding: 12px;
  font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.oshea-atc-form { flex: 1; display: flex; }
.oshea-atc-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: #fff; color: #000; border: 1.5px solid #000; border-radius: 6px;
  padding: 12px; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.oshea-atc-btn:hover { background: #000; color: #fff; }
.oshea-desc { font-size: 14px; line-height: 1.9; color: #333; }
.oshea-desc p { margin: 0 0 4px; }

/* Offers */
.oshea-offers { margin: 26px 0 6px; }
.oshea-offers-title { text-align: center; font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.oshea-offers-sub { text-align: center; font-size: 12px; color: #c33; margin-bottom: 14px; }
.oshea-offer {
  position: relative; border: 2px solid #000; border-radius: 8px;
  padding: 16px 14px; display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px; cursor: pointer; background: #fff;
}
.oshea-offer input { accent-color: #1a6ef5; }
.oshea-offer-label { flex: 1; font-size: 15px; font-weight: 700; }
.oshea-offer-badge {
  position: absolute; top: -10px; right: 50%; transform: translateX(50%);
  background: #e0311d; color: #fff; font-size: 11px; border-radius: 4px; padding: 2px 8px;
  white-space: nowrap;
}
.oshea-offer-prices { text-align: left; font-size: 12px; color: #888; }
.oshea-offer-prices .now { font-size: 14px; font-weight: 800; color: #000; display: block; }
.oshea-offer-prices .was { text-decoration: line-through; }

/* ---------- Order form ---------- */
.oshea-order-form { margin-top: 20px; }
.oshea-form-title { text-align: center; font-weight: 800; font-size: 16px; margin-bottom: 14px; }
.oshea-field { margin-bottom: 12px; }
.oshea-field label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.oshea-field input, .oshea-field textarea, .oshea-field select {
  width: 100%; border: 1px solid var(--oshea-border); border-radius: 6px;
  padding: 10px 12px; font-family: inherit; font-size: 14px; background: #fff;
}
.oshea-field textarea { min-height: 74px; resize: vertical; }
.oshea-field input:focus, .oshea-field textarea:focus, .oshea-field select:focus { outline: 1px solid #000; }
.oshea-totals { display: flex; justify-content: space-between; font-size: 13px; margin: 8px 0; }
.oshea-totals .val { font-weight: 800; }
.oshea-totals .muted { color: var(--oshea-muted); font-weight: 400; }
.oshea-submit, .oshea-btn-black {
  display: block; width: 100%; background: #000; color: #fff; border: 0;
  border-radius: 6px; padding: 13px; font-family: inherit; font-size: 14px;
  font-weight: 700; cursor: pointer; text-align: center;
}
.oshea-submit:hover, .oshea-btn-black:hover { opacity: .85; }
.oshea-form-error {
  background: #fdecea; color: #b71c1c; border-radius: 6px; padding: 10px 14px;
  font-size: 13px; margin-bottom: 12px;
}
.oshea-hp { position: absolute; right: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Fixed bottom buy bar */
.oshea-buybar {
  position: fixed; bottom: 0; right: 0; left: 0; z-index: 60;
  background: #fff; border-top: 1px solid var(--oshea-border);
  padding: 10px 16px; display: flex; align-items: center; justify-content: center; gap: 12px;
}
.oshea-qty { display: flex; align-items: center; gap: 6px; }
.oshea-qty button {
  width: 30px; height: 30px; border: 1px solid var(--oshea-border); background: #fff;
  border-radius: 6px; font-size: 16px; cursor: pointer;
}
.oshea-qty input {
  width: 44px; text-align: center; border: 1px solid var(--oshea-border);
  border-radius: 6px; padding: 6px 0; font-family: inherit;
}
.oshea-buybar .oshea-btn-black { width: auto; padding: 11px 38px; border-radius: 8px; }
body.single-product { padding-bottom: 70px; }

/* ---------- Archive / shop ---------- */
.oshea-archive { padding: 30px 0 60px; }
.oshea-archive-title { font-size: 26px; font-weight: 800; margin: 0 0 20px; }
.oshea-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ---------- Cart page ---------- */
.oshea-cart-page { padding: 30px 0 60px; }
.oshea-cart-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 34px; align-items: start; }
.oshea-cart-items { display: flex; flex-direction: column; gap: 12px; }
.oshea-cart-item {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--oshea-border); border-radius: var(--oshea-radius);
  padding: 12px; position: relative;
}
.oshea-cart-thumb { width: 86px; height: 86px; flex: 0 0 86px; background: var(--oshea-card); border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.oshea-cart-thumb img { object-fit: contain; max-height: 100%; mix-blend-mode: multiply; }
.oshea-cart-info { flex: 1; min-width: 0; }
.oshea-cart-name { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.oshea-cart-line { font-size: 14px; font-weight: 800; margin-bottom: 8px; }
.oshea-cart-qty a {
  width: 28px; height: 28px; border: 1px solid var(--oshea-border); border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
}
.oshea-cart-qty span { min-width: 26px; text-align: center; font-weight: 700; }
.oshea-cart-remove {
  position: absolute; top: 8px; left: 12px; font-size: 20px; color: #b33; line-height: 1;
}
.oshea-continue { margin-top: 6px; }
.oshea-cart-empty { text-align: center; padding: 50px 0 70px; }
.oshea-cart-empty p { font-size: 16px; margin-bottom: 18px; }
.oshea-cart-empty .oshea-btn-black { display: inline-block; width: auto; padding: 12px 36px; }
.oshea-cart-checkout {
  border: 1px solid var(--oshea-border); border-radius: var(--oshea-radius); padding: 18px;
  background: #fff;
}

/* ---------- Pages ---------- */
.oshea-page { padding: 36px 0 70px; max-width: 820px; margin: 0 auto; }
.oshea-page-title { font-size: 26px; font-weight: 800; text-align: center; margin: 0 0 26px; }
.oshea-page-content { font-size: 14px; line-height: 2; color: #333; }
.oshea-page-content h2 { font-size: 20px; }
.oshea-page-content h3 { font-size: 17px; }
.ql-align-right { text-align: right; }
.ql-align-center { text-align: center; }

/* ---------- Thank you ---------- */
.oshea-thanks { text-align: center; padding: 70px 16px 90px; }
.oshea-thanks-icon { font-size: 54px; margin-bottom: 14px; }
.oshea-thanks h1 { font-size: 24px; font-weight: 800; margin: 0 0 10px; }
.oshea-thanks p { color: #555; font-size: 14px; margin: 4px 0; }
.oshea-thanks .oshea-btn-black { display: inline-block; width: auto; padding: 12px 34px; margin-top: 22px; }

/* ---------- Footer ---------- */
.oshea-footer { background: var(--oshea-card); margin-top: 50px; padding: 26px 0 30px; }
.oshea-footer-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 26px;
  font-size: 13px; color: #333; margin-bottom: 18px;
}
.oshea-footer-copy { text-align: center; font-size: 12px; color: var(--oshea-muted); }

/* ---------- WooCommerce misc ---------- */
.woocommerce-page .oshea-container.oshea-wc-wrap { padding-top: 30px; padding-bottom: 60px; }
.onsale { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .oshea-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .oshea-nav { display: none; }
  .oshea-burger { display: inline-flex; }
  .oshea-header-inner { gap: 12px; }
  .oshea-grid-h { grid-template-columns: repeat(2, 1fr); }
  .oshea-product { grid-template-columns: 1fr; gap: 22px; padding: 22px 0 50px; }
  .oshea-gallery-main { min-height: 260px; }
  .oshea-gallery-main img { max-height: 320px; }
  .oshea-cart-grid { grid-template-columns: 1fr; gap: 22px; }
  .oshea-grid-featured { grid-template-columns: 1fr 1fr; }
  .oshea-grid-featured .oshea-card-big { grid-column: 1 / -1; grid-row: 1; }
  .oshea-card-big .oshea-card-thumb { min-height: 240px; }
}
@media (max-width: 640px) {
  .oshea-container { padding: 0 12px; }
  .oshea-hero { padding: 14px 0 4px; }
  .oshea-section { padding: 24px 0 6px; }
  .oshea-section-title { font-size: 20px; }
  .oshea-grid, .oshea-grid-h { grid-template-columns: 1fr 1fr; gap: 10px; }
  .oshea-grid-featured { gap: 10px; }
  .oshea-grid-h { grid-template-columns: 1fr; }
  .oshea-card-meta { font-size: 12px; padding: 8px 2px 2px; }
  .oshea-product-title { font-size: 20px; }
  .oshea-product-price { font-size: 18px; margin-bottom: 12px; }
  .oshea-buy-row { flex-direction: column; gap: 8px; }
  .oshea-desc { font-size: 13px; }
  .oshea-offers-title { font-size: 17px; }
  .oshea-offer-label { font-size: 13px; }
  .oshea-offer-prices .now { font-size: 13px; }
  .oshea-form-title { font-size: 14px; }
  .oshea-field input, .oshea-field textarea, .oshea-field select { font-size: 16px; padding: 11px 12px; } /* 16px stops iOS zoom */
  .oshea-buybar { padding: 8px 10px; gap: 8px; }
  .oshea-buybar .oshea-btn-black { padding: 11px 16px; font-size: 13px; flex: 1; }
  .oshea-qty input { width: 36px; }
  .oshea-archive-title, .oshea-page-title { font-size: 20px; }
  .oshea-archive, .oshea-cart-page { padding: 20px 0 46px; }
  .oshea-page { padding: 24px 0 50px; }
  .oshea-footer { margin-top: 30px; padding: 20px 0 24px; }
  .oshea-footer-links { gap: 14px 20px; font-size: 12px; }
  .oshea-gallery-thumbs button { width: 52px; height: 52px; }
  .oshea-cart-thumb { width: 70px; height: 70px; flex-basis: 70px; }
  .oshea-cart-checkout { padding: 14px; }
  .oshea-thanks { padding: 46px 12px 60px; }
  .oshea-logo img { height: 28px; }
}
@media (max-width: 380px) {
  .oshea-grid, .oshea-grid-featured { grid-template-columns: 1fr; }
  .oshea-grid-featured .oshea-card-big { grid-column: 1; }
}
