/*
Theme Name: زیبا گیفت (فروشگاه کادویی)
Theme URI: https://example.com
Author: Claude
Description: قالب فروشگاهی راست‌چین شبیه دیجی‌کالا برای فروشگاه کادو و اکسسوری (نیازمند افزونه ووکامرس)
Version: 1.0
Text Domain: zibagift
Requires at least: 6.0
Requires PHP: 7.4
Language: fa
*/

*,*::before,*::after{box-sizing:border-box}
:root{--red:#e75480;--red-d:#c9416a;--red2:#ffb3cf;--dark:#1f2937;--gray:#6b7280;--line:#eceef2;--bg:#fdf4f7;--white:#fff}
html{direction:rtl}
body{margin:0;font-family:Tahoma,"Vazirmatn",sans-serif;background:var(--bg);color:var(--dark);font-size:15px;line-height:1.9}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto;display:block}
.zg-container{max-width:1200px;margin:0 auto;padding:0 16px}

/* Header */
.zg-header{background:var(--red);position:sticky;top:0;z-index:50;box-shadow:0 2px 8px rgba(0,0,0,.08)}
.zg-top{display:flex;align-items:center;gap:20px;padding:12px 0;color:#fff}
.zg-logo{font-size:22px;font-weight:700;white-space:nowrap;color:#fff}
.zg-search{flex:1;display:flex;background:#fff;border-radius:10px;overflow:hidden;max-width:620px}
.zg-search input{flex:1;border:0;padding:10px 14px;font-family:inherit;font-size:14px;outline:none}
.zg-search button{border:0;background:var(--dark);color:#fff;padding:0 18px;cursor:pointer;font-family:inherit}
.zg-actions{display:flex;gap:16px;margin-right:auto;white-space:nowrap;font-size:14px}
.zg-cart{background:#fff;color:var(--red);padding:6px 12px;border-radius:8px;font-weight:700}
.zg-nav{background:var(--white);border-bottom:1px solid var(--line)}
.zg-nav ul{list-style:none;margin:0;padding:0;display:flex;gap:22px;overflow-x:auto;white-space:nowrap}
.zg-nav a{display:block;padding:10px 0;font-size:14px;font-weight:600}
.zg-nav a:hover{color:var(--red)}

/* Hero */
.zg-hero{margin:20px 0;background:linear-gradient(120deg,var(--red2),var(--red));border-radius:16px;color:#fff;padding:48px 32px;min-height:220px;display:flex;flex-direction:column;justify-content:center}
.zg-hero h1{margin:0 0 8px;font-size:30px}
.zg-hero p{margin:0 0 18px;opacity:.95}
.zg-btn{display:inline-block;background:#fff;color:var(--red);padding:10px 22px;border-radius:10px;font-weight:700;align-self:flex-start}

/* Categories */
.zg-section{background:var(--white);border-radius:14px;padding:20px;margin-bottom:20px}
.zg-section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.zg-section-head h2{margin:0;font-size:18px}
.zg-section-head a{color:var(--red);font-size:14px}
.zg-cats{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:14px;text-align:center}
.zg-cat{padding:12px 6px;border-radius:12px;background:var(--bg);font-size:14px;font-weight:600}
.zg-cat:hover{background:#ffe6ea;color:var(--red)}

/* Products grid */
.zg-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px}
.zg-card{background:var(--white);border:1px solid var(--line);border-radius:12px;padding:12px;display:block;transition:box-shadow .2s}
.zg-card:hover{box-shadow:0 6px 18px rgba(0,0,0,.08)}
.zg-card-img img{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:8px;background:var(--bg)}
.zg-card h3{font-size:14px;margin:10px 0 4px;font-weight:600;min-height:44px}
.zg-price{color:var(--red);font-weight:700;font-size:15px}
.zg-price del{color:var(--gray);font-size:12px;margin-left:6px}

/* Features bar */
.zg-features{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin-bottom:20px}
.zg-feature{background:var(--white);border-radius:12px;padding:16px;text-align:center;font-size:14px;font-weight:600}

/* Footer */
.zg-footer{background:var(--dark);color:#cbd5e1;margin-top:30px;padding:36px 0 20px;font-size:14px}
.zg-footer-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:24px}
.zg-footer h4{color:#fff;margin:0 0 10px}
.zg-footer ul{list-style:none;padding:0;margin:0}
.zg-footer li{margin-bottom:6px}
.zg-copy{text-align:center;border-top:1px solid #374151;margin-top:24px;padding-top:14px;font-size:12px}

/* Generic content & WooCommerce */
.zg-wc{padding-top:20px}
.woocommerce ul.products{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px;list-style:none;padding:0;margin:0}
.woocommerce ul.products li.product{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px;margin:0!important;width:auto!important}
.woocommerce a.button,.woocommerce button.button,.woocommerce input.button{background:var(--red)!important;color:#fff!important;border-radius:8px;border:0}
.woocommerce span.onsale{background:var(--red);border-radius:6px}
.zg-page{background:#fff;border-radius:14px;padding:24px}

@media (max-width:640px){
  .zg-top{flex-wrap:wrap}
  .zg-search{order:3;max-width:100%;flex-basis:100%}
  .zg-hero h1{font-size:22px}
  .zg-actions{font-size:13px}
}

/* صفحه‌های ساخته‌شده با المنتور */
.zg-elementor{width:100%;max-width:none;padding:0;margin:0}
.zg-elementor > .elementor{width:100%}

/* انتخاب رنگ محصول */
.zg-colors{margin:14px 0}
.zg-colors-title{font-weight:700;margin-bottom:8px}
.zg-swatches{display:flex;flex-wrap:wrap;gap:8px}
.zg-swatch-input{position:absolute;opacity:0;pointer-events:none}
.zg-swatch{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:10px;padding:6px 10px;cursor:pointer;font-size:14px;background:#fff}
.zg-swatch-dot{width:18px;height:18px;border-radius:50%;border:1px solid #ddd;display:inline-block}
.zg-swatch-input:checked + .zg-swatch{border-color:var(--red);box-shadow:0 0 0 2px var(--red2)}
.zg-card-img img{width:100%;height:auto;aspect-ratio:1/1;object-fit:cover;border-radius:8px;background:#fff}

/* ---------- ظاهر شادتر (نسخه‌ی ۵) ---------- */
body{background:#fff5f9}
.zg-header{background:linear-gradient(90deg,var(--red),#b57edc)}
.zg-nav{background:#fff;border-bottom:2px solid var(--red2)}
.zg-nav a:hover{color:#b57edc}
.zg-hero{background:linear-gradient(120deg,var(--red2) 0%,var(--red) 60%,#b57edc 100%);box-shadow:0 10px 30px rgba(231,84,128,.25);position:relative;overflow:hidden}
.zg-hero::after{content:"";position:absolute;left:-40px;bottom:-60px;width:220px;height:220px;border-radius:50%;background:rgba(255,255,255,.15)}
.zg-hero h1{text-shadow:0 2px 8px rgba(0,0,0,.12)}
.zg-btn{box-shadow:0 6px 16px rgba(0,0,0,.12)}
.zg-features{gap:14px}
.zg-feature{background:#fff;border-top:3px solid var(--red);box-shadow:0 4px 12px rgba(231,84,128,.08);color:var(--dark)}
.zg-section{background:#fff;box-shadow:0 4px 16px rgba(231,84,128,.07);border:1px solid #ffe3ee}
.zg-section-head h2{color:var(--red-d);position:relative;padding-right:12px}
.zg-section-head h2::before{content:"";position:absolute;right:0;top:4px;bottom:4px;width:4px;border-radius:4px;background:linear-gradient(var(--red),#b57edc)}
.zg-cat{background:#fff;border:1px solid var(--red2);color:var(--red-d);box-shadow:0 2px 6px rgba(231,84,128,.08);transition:all .2s}
.zg-cat:hover{background:linear-gradient(120deg,var(--red),#b57edc);color:#fff;border-color:transparent}
.zg-card{border:1px solid #ffe3ee;border-radius:14px;transition:transform .2s,box-shadow .2s,border-color .2s}
.zg-card:hover{transform:translateY(-4px);box-shadow:0 12px 24px rgba(231,84,128,.18);border-color:var(--red2)}
.zg-card-img{background:#fff7fa;border-radius:10px;overflow:hidden}
.zg-card-img img{display:block;width:100%;height:auto;aspect-ratio:1/1;object-fit:contain;background:#fff7fa}
.zg-price{color:var(--red-d);font-weight:800}
.zg-footer{background:linear-gradient(160deg,#3b1f2e,#5a2a48);color:#f3dbe6}
.zg-footer h4{color:var(--red2)}
.zg-copy{border-top:1px solid rgba(255,255,255,.15)}
.zg-swatch-input:checked + .zg-swatch{background:#fff0f6}
.woocommerce ul.products li.product{border-radius:14px;transition:transform .2s,box-shadow .2s}
.woocommerce ul.products li.product:hover{transform:translateY(-4px);box-shadow:0 12px 24px rgba(231,84,128,.18)}
.zg-page{box-shadow:0 4px 16px rgba(231,84,128,.07)}

/* نشان تخفیف روی کارت‌ها */
.zg-card{position:relative}
.zg-card-img{position:relative}
.zg-sale{position:absolute;top:8px;right:8px;background:var(--red);color:#fff;font-size:12px;font-weight:800;padding:4px 10px;border-radius:8px;box-shadow:0 2px 6px rgba(0,0,0,.15);line-height:1.6;z-index:2}
.woocommerce span.onsale.zg-sale{background:var(--red);color:#fff;min-height:auto;min-width:auto;line-height:1.6;padding:4px 10px;font-size:12px;border-radius:8px}

/* سوالات متداول (باز و بسته شونده) */
.zg-page details{border:1px solid #ffe3ee;border-radius:12px;padding:12px 16px;margin:10px 0;background:#fff;box-shadow:0 2px 8px rgba(231,84,128,.06)}
.zg-page summary{cursor:pointer;font-weight:700;color:var(--red-d);font-size:16px}
.zg-page details[open] summary{margin-bottom:8px}
.zg-page h3{color:var(--red-d);margin-top:20px}

/* صفحه‌ی محصول: فقط یک عکس اصلی نمایش داده شود */
.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:nth-child(n+2){display:none!important}
.woocommerce-product-gallery .flex-control-nav,
.woocommerce-product-gallery .flex-control-thumbs{display:none!important}
.woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img{width:100%;height:auto;object-fit:contain;background:#fff7fa;border-radius:14px}

/* عکس‌های تکراری داخل توضیح کوتاه محصول پنهان شوند */
.woocommerce-product-details__short-description img,
.summary .woocommerce-product-details__short-description img{display:none!important}
.woocommerce-product-details__short-description figure{display:none!important}

/* لوگو در صفحه‌ی اصلی */
.zg-home-logo{text-align:center;margin:24px 0 8px}
.zg-home-logo img{display:inline-block;max-width:280px;width:60%;height:auto}
@media (max-width:640px){.zg-home-logo img{width:70%}}

/* لوگو زیر نام داخل هدر */
.zg-logo{display:flex;flex-direction:column;align-items:flex-end;gap:2px;color:#fff}
.zg-logo-text{font-size:22px;font-weight:700;line-height:1.3}
.zg-logo-img{height:46px;width:auto;display:block;filter:drop-shadow(0 1px 2px rgba(0,0,0,.15))}
.zg-shop-head{background:#fff;border-radius:14px;padding:18px 20px;margin:20px 0 16px;box-shadow:0 4px 16px rgba(231,84,128,.07)}
.zg-shop-head h1{margin:0;font-size:22px;color:var(--red-d)}

/* هدر یکسان و شیک در همه‌ی صفحه‌ها */
.zg-header .zg-logo{display:flex!important;flex-direction:row;align-items:center;gap:10px;color:#fff;text-decoration:none;flex-shrink:0}
.zg-header .zg-logo-img{height:46px!important;width:auto!important;max-width:60px;display:block;margin:0;filter:drop-shadow(0 1px 2px rgba(0,0,0,.15))}
.zg-header .zg-logo-text{font-size:17px;font-weight:500;letter-spacing:.3px;line-height:1.4;white-space:nowrap;opacity:.96}
.zg-header .zg-top{min-height:0}
@media (max-width:640px){
  .zg-header .zg-logo-text{font-size:15px}
  .zg-header .zg-logo-img{height:40px!important}
}

/* هدر: آیکون و نام متناسب کنار هم */
.zg-header .zg-logo{display:flex!important;flex-direction:row;align-items:center;gap:10px;color:#fff;text-decoration:none;flex-shrink:0}
.zg-header .zg-logo-img{height:48px!important;width:auto!important;display:block;margin:0;filter:drop-shadow(0 2px 4px rgba(0,0,0,.2))}
.zg-header .zg-logo-text{font-size:18px;font-weight:600;letter-spacing:.2px;line-height:1.3;white-space:nowrap}
@media (max-width:640px){
  .zg-header .zg-logo-img{height:40px!important}
  .zg-header .zg-logo-text{font-size:16px}
}

/* صفحه‌ی فروشگاه و صفحه‌بندی */
.zg-empty{background:#fff;border-radius:14px;padding:24px;text-align:center;color:var(--gray)}
.zg-pager{text-align:center;margin:24px 0}
.zg-pager .page-numbers{display:inline-block;min-width:38px;padding:8px 12px;margin:0 3px;border-radius:10px;background:#fff;border:1px solid var(--red2);color:var(--red-d);font-weight:700}
.zg-pager .page-numbers.current{background:linear-gradient(120deg,var(--red),#b57edc);color:#fff;border-color:transparent}

/* صفحه‌ی حساب کاربری: مرتب و شیک */
.zg-page .woocommerce{display:grid;grid-template-columns:260px 1fr;gap:24px;align-items:start}
@media (max-width:768px){.zg-page .woocommerce{grid-template-columns:1fr}}
.woocommerce-MyAccount-navigation{background:#fff;border-radius:16px;padding:12px;border:1px solid #ffe3ee;box-shadow:0 4px 16px rgba(231,84,128,.08)}
.woocommerce-MyAccount-navigation ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.woocommerce-MyAccount-navigation li{margin:0;padding:0;border:0}
.woocommerce-MyAccount-navigation li a{display:block;padding:12px 16px;border-radius:12px;color:var(--dark);font-weight:600;transition:all .2s}
.woocommerce-MyAccount-navigation li a:hover{background:#fff0f6;color:var(--red-d)}
.woocommerce-MyAccount-navigation li.is-active a{background:linear-gradient(120deg,var(--red),#b57edc);color:#fff}
.woocommerce-MyAccount-content{background:#fff;border-radius:16px;padding:24px;border:1px solid #ffe3ee;box-shadow:0 4px 16px rgba(231,84,128,.08);line-height:2}
.woocommerce-MyAccount-content p{margin:0 0 12px}
.woocommerce-MyAccount-content a{color:var(--red-d);font-weight:600}
.woocommerce table.shop_table{border-radius:12px;overflow:hidden;border:1px solid #ffe3ee}
.woocommerce form .form-row input.input-text,.woocommerce form .form-row select{border-radius:10px;border:1px solid #ffd0e0;padding:10px 12px}
.woocommerce-MyAccount-content .button,.woocommerce form .button,.woocommerce button.button{border-radius:10px;padding:10px 20px}

/* لوگوی کامل در هدر: سمت راست، نام فروشگاه سمت چپ آن */
.zg-header .zg-logo{display:flex!important;flex-direction:row;align-items:center;gap:12px;color:#fff;text-decoration:none;flex-shrink:0}
.zg-header .zg-logo-img{height:56px!important;width:auto!important;display:block;margin:0;filter:drop-shadow(0 2px 4px rgba(0,0,0,.18))}
.zg-header .zg-logo-text{font-size:18px;font-weight:600;white-space:nowrap}
@media (max-width:640px){
  .zg-header .zg-logo-img{height:46px!important}
  .zg-header .zg-logo-text{font-size:16px}
}
