/*
Theme Name: Hamoon Collection
Theme URI: https://www.hamooncollection.ir
Author: Hamoon Collection
Author URI: https://www.hamooncollection.ir
Description: قالب اختصاصی فروشگاه پوشاک زنانه هامون کالکشن. طراحی موبایل‌محور، سبک و بهینه‌سازی‌شده برای ووکامرس.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hamoon-collection
Tags: e-commerce, rtl-language-support, translation-ready, woocommerce
*/

:root {
    --hamoon-bg: #ffffff;
    --hamoon-surface: #faf7f2;
    --hamoon-text: #201d1a;
    --hamoon-muted: #6f6a63;
    --hamoon-border: #e9e3da;
    --hamoon-accent: #8a2b3f;
    --hamoon-accent-dark: #6e2232;
    --hamoon-radius: 12px;
    --hamoon-container: 1280px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    font-family: "Vazirmatn", "IRANSans", "Segoe UI", Tahoma, sans-serif;
    background: var(--hamoon-bg);
    color: var(--hamoon-text);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: var(--hamoon-container);
    margin-inline: auto;
    padding-inline: 16px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--hamoon-border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 76px;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.custom-logo {
    max-height: 48px;
    width: auto;
}

.main-navigation ul {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--hamoon-text);
    padding: 10px 4px;
    border-bottom: 2px solid transparent;
}

.main-navigation a:hover,
.main-navigation a:focus-visible {
    color: var(--hamoon-accent);
    border-bottom-color: var(--hamoon-accent);
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-inline-start: auto;
}

.header-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 7px 10px;
    color: var(--hamoon-text);
    border-radius: 10px;
}

.header-action:hover,
.header-action:focus-visible {
    background: var(--hamoon-surface);
    color: var(--hamoon-accent);
}

.header-action .dashicons {
    font-size: 20px;
}

.header-cart-count {
    display: inline-grid;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    place-items: center;
    border-radius: 999px;
    background: var(--hamoon-accent);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
}

.menu-toggle {
    display: none;
}

.site-footer {
    background: var(--hamoon-surface);
    border-top: 1px solid var(--hamoon-border);
    margin-top: 48px;
}

.site-footer__badges {
    display: flex;
    direction: ltr;
    align-items: stretch;
    justify-content: flex-start;
    gap: 14px;
    padding-top: 28px;
}

.site-footer__badge {
    display: flex;
    flex: 0 1 170px;
    width: 170px;
    min-height: 142px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--hamoon-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(32,29,26,.05);
    text-align: center;
}

.site-footer__badge-label {
    direction: rtl;
    color: var(--hamoon-muted);
    font-size: .78rem;
    font-weight: 700;
}

.site-footer__badge img {
    width: 100%;
    height: 82px;
    object-fit: contain;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding-block: 42px;
}

.site-footer__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
    margin-inline-start: auto;
    align-items: center;
    color: var(--hamoon-muted);
    font-size: .9rem;
}

.site-footer__trust span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.site-footer__trust .dashicons {
    color: var(--hamoon-accent);
    font-size: 19px;
}

.site-footer__brand p {
    margin: 0 0 5px;
}

.site-footer__socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
    margin-inline-start: auto;
}

.site-footer__socials a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 5px 12px;
    border: 1px solid var(--hamoon-border);
    border-radius: 999px;
    background: #fff;
    color: var(--hamoon-accent);
    font-size: .85rem;
    font-weight: 700;
}

.site-footer__socials .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.site-footer__socials a:hover,
.site-footer__socials a:focus-visible {
    background: var(--hamoon-accent);
    border-color: var(--hamoon-accent);
    color: #fff;
}

.site-footer__name {
    margin: 0 0 4px;
    font-weight: 700;
}

.site-footer__desc {
    margin: 0;
    color: var(--hamoon-muted);
}

.site-footer__bottom {
    border-top: 1px solid var(--hamoon-border);
    padding-block: 16px;
    text-align: center;
    color: var(--hamoon-muted);
    font-size: 0.85rem;
}

.site-footer__bottom p {
    margin: 0;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--hamoon-accent);
    color: #fff;
    padding: 8px 16px;
    z-index: 200;
}

.skip-link:focus {
    left: 16px;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: inline-flex;
        flex-direction: column;
        gap: 5px;
        background: transparent;
        border: 0;
        cursor: pointer;
        padding: 8px;
    }

    .menu-toggle__bar {
        width: 24px;
        height: 2px;
        background: var(--hamoon-text);
        display: block;
    }

    .main-navigation ul {
        display: none;
        position: absolute;
        inset-inline: 0;
        top: 100%;
        flex-direction: column;
        background: #fff;
        border-bottom: 1px solid var(--hamoon-border);
        padding: 16px;
        gap: 12px;
    }

    .main-navigation.is-open ul {
        display: flex;
    }
}

@media (max-width: 768px) {
    body.hamoon-site,
    body.hamoon-site > header,
    body.hamoon-site > main,
    body.hamoon-site > footer,
    body.hamoon-site .site-header__inner,
    body.hamoon-site .site-main > section,
    body.hamoon-site .site-main > div {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    body.hamoon-site .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}


/* =========================================================================
 * PHASE 1 — Home page styles
 * ========================================================================= */

/* ---------- Section helpers ---------- */
.hamoon-section {
    padding: 64px 0;
}
.hamoon-section__title {
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 32px;
    color: var(--hamoon-dark, #2b2b2b);
    position: relative;
}

.hamoon-section__heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.hamoon-section__eyebrow {
    margin: 0 0 6px;
    color: var(--hamoon-accent);
    font-size: .9rem;
    font-weight: 700;
}

.hamoon-section__heading .hamoon-section__title {
    margin-bottom: 0;
}

.hamoon-section__link {
    color: var(--hamoon-accent);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.hamoon-section__link:hover,
.hamoon-section__link:focus-visible {
    color: var(--hamoon-accent-dark);
    text-decoration: underline;
}
.hamoon-section__title::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    margin: 12px auto 0;
    background: var(--hamoon-accent, #8a2b3f);
    border-radius: 2px;
}
.hamoon-section__more {
    text-align: center;
    margin-top: 36px;
}

/* ---------- Buttons ---------- */
.hamoon-btn {
    display: inline-block;
    background: var(--hamoon-accent, #8a2b3f);
    color: #fff;
    text-decoration: none;
    padding: 13px 32px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1;
    transition: background .2s ease, transform .2s ease;
    border: 2px solid var(--hamoon-accent, #8a2b3f);
}
.hamoon-btn:hover {
    background: #6f2232;
    border-color: #6f2232;
    color: #fff;
    transform: translateY(-1px);
}
.hamoon-btn--light {
    background: #fff;
    color: var(--hamoon-accent, #8a2b3f);
}
.hamoon-btn--light:hover {
    background: var(--hamoon-accent, #8a2b3f);
    color: #fff;
}
.hamoon-btn--small {
    padding: 9px 20px;
    font-size: 0.85rem;
}

/* ---------- Hero ---------- */
.hamoon-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #f3ede6;
}
.hamoon-hero--slider { min-height: 0; height: clamp(420px, 37.5vw, 720px); }
.hamoon-hero__slides,
.hamoon-hero__slide { position: absolute; inset: 0; }
.hamoon-hero__slide { opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s ease; }
.hamoon-hero__slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.hamoon-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hamoon-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(30,20,24,.72) 0%, rgba(30,20,24,.25) 60%, rgba(30,20,24,.1) 100%);
}
.hamoon-hero__content {
    position: relative;
    z-index: 2;
    max-width: 560px;
    color: #fff;
}
.hamoon-hero__title {
    font-size: 2.4rem;
    line-height: 1.3;
    font-weight: 800;
    margin: 0 0 16px;
    color: #fff;
}
.hamoon-hero__subtitle {
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0 0 28px;
    opacity: .95;
}
.hamoon-hero__arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.85);
    color: var(--hamoon-accent);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}
.hamoon-hero__arrow--prev { left: 22px; }
.hamoon-hero__arrow--next { right: 22px; }
.hamoon-hero__dots {
    position: absolute;
    left: 50%;
    bottom: 22px;
    z-index: 4;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}
.hamoon-hero__dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.6);
    cursor: pointer;
}
.hamoon-hero__dots button.is-active { width: 26px; border-radius: 999px; background: #fff; }

/* ---------- Benefits ---------- */
.hamoon-benefits {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 28px 0;
}
.hamoon-benefits__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.hamoon-benefit {
    text-align: center;
}
.hamoon-benefit__icon {
    font-size: 30px;
    width: 30px;
    height: 30px;
    color: var(--hamoon-accent, #8a2b3f);
    margin-bottom: 8px;
}
.hamoon-benefit__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--hamoon-dark, #2b2b2b);
}
.hamoon-benefit__desc {
    font-size: .85rem;
    margin: 0;
    color: #777;
}

/* ---------- Categories ---------- */
.hamoon-categories {
    background: #faf8f5;
}
.hamoon-categories__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.hamoon-cat {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #eee;
    text-decoration: none;
}
.hamoon-cat img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.hamoon-cat:hover img {
    transform: scale(1.06);
}
.hamoon-cat__label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px 16px 16px;
    background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
}
.hamoon-cat__label strong,
.hamoon-cat__label small {
    display: block;
}
.hamoon-cat__label small {
    margin-top: 4px;
    font-size: .78rem;
    font-weight: 400;
    line-height: 1.6;
    opacity: .9;
}

/* ---------- Product grid / cards ---------- */
.hamoon-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.hamoon-card {
    background: #fff;
    border: 1px solid #f0ece6;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .25s ease, transform .25s ease;
}
.hamoon-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    transform: translateY(-3px);
}
.hamoon-card__thumb {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #f3ede6;
}
.hamoon-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.hamoon-card:hover .hamoon-card__thumb img {
    transform: scale(1.05);
}
.hamoon-card__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #d33;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}
.hamoon-card__body {
    padding: 16px;
    text-align: center;
}
.hamoon-card__title {
    font-size: .95rem;
    font-weight: 700;
    margin: 0 0 6px;
}
.hamoon-card__title a {
    color: var(--hamoon-dark, #2b2b2b);
    text-decoration: none;
}
.hamoon-card__title a:hover {
    color: var(--hamoon-accent, #8a2b3f);
}
.hamoon-card__price {
    font-size: .9rem;
    margin: 0 0 14px;
    color: #333;
}
.hamoon-card__price ins {
    text-decoration: none;
    color: var(--hamoon-accent, #8a2b3f);
    font-weight: 700;
    margin-left: 6px;
}
.hamoon-card__price del {
    color: #aaa;
    font-size: .8rem;
}

/* ---------- Club ---------- */
.hamoon-club {
    background: var(--hamoon-accent, #8a2b3f);
    color: #fff;
}
.hamoon-club__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.hamoon-club__title {
    font-size: 1.5rem;
    margin: 0 0 8px;
    color: #fff;
}
.hamoon-club__desc {
    margin: 0;
    opacity: .92;
    line-height: 1.8;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .hamoon-grid,
    .hamoon-categories__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .hamoon-section { padding: 44px 0; }
    .hamoon-section__heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }
    .hamoon-section__heading .hamoon-section__title {
        text-align: right;
    }
    .hamoon-section__heading .hamoon-section__title::after {
        margin-right: 0;
        margin-left: auto;
    }
    .hamoon-hero { min-height: 420px; }
    .hamoon-hero--slider { height: 62vw; min-height: 360px; max-height: 520px; }
    .hamoon-hero__title { font-size: 1.8rem; }
    .hamoon-hero__subtitle { font-size: 1rem; }
    .hamoon-benefits__grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .hamoon-grid,
    .hamoon-categories__grid { grid-template-columns: repeat(2, 1fr); }
    .hamoon-club__inner { justify-content: center; text-align: center; }
}
@media (max-width: 480px) {
    .hamoon-hero { min-height: 360px; }
    .hamoon-hero--slider { height: 92vw; min-height: 340px; }
    .hamoon-hero__title { font-size: 1.5rem; }
}


/* =========================================================================
 * PHASE 2 — Single Product Page Styles
 * ========================================================================= */

.hamoon-single-product-wrapper {
    padding: 40px 0;
    background: #fff;
}

/* Container for product summary and image */
.woocommerce-product-gallery {
    margin-bottom: 30px;
}

.summary.entry-summary {
    margin-bottom: 30px;
}

/* Product Title */
.product_title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--hamoon-dark);
}

/* Price */
.woocommerce-Price-amount {
    font-size: 1.4rem;
    color: var(--hamoon-accent);
    font-weight: 700;
}

.woocommerce-product-details__short-description {
    margin-bottom: 25px;
    line-height: 1.8;
    color: #666;
    font-size: 0.95rem;
}

/* Add to Cart Button */
.single_add_to_cart_button {
    background-color: var(--hamoon-accent) !important;
    color: #fff !important;
    padding: 12px 40px !important;
    font-size: 1rem !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.single_add_to_cart_button:hover {
    background-color: #6f2232 !important;
    transform: translateY(-2px);
}

/* Tabs (Description, Reviews) */
.woocommerce-tabs {
    margin-top: 50px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.woocommerce-tabs ul.tabs {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.woocommerce-tabs ul.tabs li a {
    text-decoration: none;
    color: #999;
    font-weight: 700;
    padding-bottom: 10px;
    display: inline-block;
}

.woocommerce-tabs ul.tabs li.active a {
    color: var(--hamoon-accent);
    border-bottom: 2px solid var(--hamoon-accent);
}

/* Related Products */
.related.products {
    margin-top: 60px;
}

.related.products h2 {
    font-size: 1.4rem;
    margin-bottom: 30px;
    text-align: center;
}

/* Product Meta (SKU, Categories) */
.product_meta {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #eee;
    font-size: 0.85rem;
    color: #888;
}

.product_meta span {
    display: block;
    margin-bottom: 5px;
}

.product_meta a {
    color: var(--hamoon-accent);
    text-decoration: none;
}


/* =========================================================================
 * PHASE 3 — Header & Mobile Menu
 * ========================================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.06);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
}

.site-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--hamoon-dark);
    text-decoration: none;
}

.main-navigation {
    display: flex;
    align-items: center;
}

#primary-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 0;
    padding: 0;
}

#primary-menu a {
    text-decoration: none;
    color: var(--hamoon-dark);
    font-weight: 600;
    transition: color 0.3s ease;
}

#primary-menu a:hover {
    color: var(--hamoon-accent);
}

.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle__bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--hamoon-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

@media (max-width: 992px) {
    .menu-toggle {
        display: inline-flex;
    }

    .main-navigation {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: #fff;
        border-top: 1px solid #eee;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
        padding: 0 20px;
        display: none;
    }

    .main-navigation.is-open {
        display: block;
    }

    #primary-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 14px 0;
    }

    #primary-menu li {
        border-bottom: 1px solid #f2f2f2;
    }

    #primary-menu li:last-child {
        border-bottom: 0;
    }

    #primary-menu a {
        display: block;
        padding: 14px 0;
    }
}


/* =========================================================================
 * PHASE 4 — Shop Archive & Product Grid
 * ========================================================================= */

.hamoon-shop-hero { padding: 42px 0 28px; background: linear-gradient(180deg, #fff 0%, #fcf8f5 100%); border-bottom: 1px solid var(--hamoon-border); }
.hamoon-shop-hero__content { max-width: 760px; }
.hamoon-shop-hero__eyebrow { margin: 0 0 8px; color: var(--hamoon-accent); font-weight: 700; }
.hamoon-shop-hero__title { margin: 0 0 12px; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.3; color: var(--hamoon-text); }
.hamoon-shop-hero__description { color: var(--hamoon-muted); line-height: 1.9; }
.hamoon-shop-layout { padding: 30px 0 60px; }
.hamoon-shop-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.hamoon-product-search {
    display: flex;
    flex: 1 1 420px;
    gap: 8px;
}
.hamoon-product-search input,
.hamoon-product-search select,
.hamoon-category-filter select {
    min-height: 46px;
    border: 1px solid var(--hamoon-border);
    border-radius: 10px;
    background: #fff;
    color: var(--hamoon-text);
    padding: 0 14px;
}
.hamoon-product-search input { flex: 1; }
.hamoon-product-search select { min-width: 150px; }
.hamoon-home-search {
    position: relative;
    z-index: 3;
    margin-top: -28px;
    padding-bottom: 8px;
}
.hamoon-product-search--home {
    max-width: 760px;
    margin-inline: auto;
    padding: 8px;
    border: 1px solid var(--hamoon-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(32,29,26,.10);
}
.hamoon-product-search--home .dashicons {
    align-self: center;
    margin-inline: 8px;
    color: var(--hamoon-accent);
}
.hamoon-product-search button {
    min-height: 46px;
    border: 0;
    border-radius: 10px;
    background: var(--hamoon-accent);
    color: #fff;
    padding: 0 18px;
    font-weight: 700;
    cursor: pointer;
}
.hamoon-product-search button:hover,
.hamoon-product-search button:focus-visible {
    background: var(--hamoon-accent-dark);
}
.hamoon-shop-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:22px; padding:16px 18px; background:#fff; border:1px solid var(--hamoon-border); border-radius: var(--hamoon-radius); }
.woocommerce-result-count { margin:0; color: var(--hamoon-muted); }
.woocommerce-ordering select, .woocommerce .woocommerce-ordering select { min-height:44px; padding:0 14px; border:1px solid var(--hamoon-border); border-radius:10px; background:#fff; color:var(--hamoon-text); outline:none; }
.woocommerce ul.products { margin:0; display:grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:22px; }
.woocommerce ul.products li.product { width:auto !important; margin:0 !important; padding:18px; background:#fff; border:1px solid var(--hamoon-border); border-radius:18px; box-shadow:0 8px 26px rgba(32,29,26,.04); overflow:hidden; transition:transform .25s ease, box-shadow .25s ease; }
.woocommerce ul.products li.product:hover { transform: translateY(-4px); box-shadow:0 16px 34px rgba(32,29,26,.08); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size:1rem; line-height:1.7; color:var(--hamoon-text); margin-top:14px; margin-bottom:8px; }
.woocommerce ul.products li.product .price { font-size:1rem; color:var(--hamoon-accent); font-weight:700; }
.woocommerce ul.products li.product .button { display:inline-flex; align-items:center; justify-content:center; width:100%; min-height:44px; margin-top:14px; border:0; border-radius:10px; background:var(--hamoon-accent); color:#fff; font-weight:700; }
.woocommerce ul.products li.product .button:hover { background:var(--hamoon-accent-dark); }
.woocommerce nav.woocommerce-pagination { margin-top:34px; text-align:center; }
.woocommerce nav.woocommerce-pagination ul { border:0; display:inline-flex; gap:8px; flex-wrap:wrap; }
.woocommerce nav.woocommerce-pagination ul li { border:0; }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span { min-width:42px; height:42px; line-height:42px; border-radius:10px; border:1px solid var(--hamoon-border); background:#fff; color:var(--hamoon-text); font-weight:700; }
.woocommerce nav.woocommerce-pagination ul li span.current, .woocommerce nav.woocommerce-pagination ul li a:hover { background:var(--hamoon-accent); color:#fff; border-color:var(--hamoon-accent); }


/* Product cards */
.woocommerce ul.products li.product .woocommerce-loop-product__link {
    display: block;
    height: 100%;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    min-height: 3.4em;
}

.woocommerce ul.products li.product .star-rating {
    margin: 8px 0 0;
}

.woocommerce ul.products li.product .onsale {
    top: 12px;
    right: auto;
    left: 12px;
    background: var(--hamoon-accent);
    color: #fff;
    border: 0;
    min-height: 34px;
    min-width: 34px;
    line-height: 34px;
    border-radius: 999px;
    font-weight: 700;
    padding: 0 10px;
}

.woocommerce ul.products li.product .price del {
    opacity: 0.55;
    font-weight: 500;
}

.woocommerce ul.products li.product .price ins {
    text-decoration: none;
}

.woocommerce ul.products li.product .added_to_cart {
    display: inline-block;
    margin-top: 10px;
    color: var(--hamoon-accent);
    font-weight: 700;
}

.woocommerce ul.products li.product img {
    border-radius: 14px;
    margin: 0;
    background: #fff;
    aspect-ratio: 1 / 1.15;
    object-fit: cover;
}

@media (max-width: 1200px){ .woocommerce ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px){
    .site-header__actions { margin-inline-start: 0; }
    .header-action__label { display: none; }
    .hamoon-shop-tools { align-items: stretch; flex-direction: column; }
    .site-footer__badges {
        justify-content: center;
        flex-wrap: wrap;
    }
    .site-footer__badge {
        flex-basis: 150px;
        width: 150px;
    }
    .hamoon-shop-toolbar { padding:14px; }
    .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap:16px; }
}
@media (max-width: 576px){ .hamoon-shop-hero { padding:30px 0 20px; } .woocommerce ul.products { grid-template-columns: 1fr; } }


/* =========================================================================
 * PHASE 5 — Cart & Checkout
 * ========================================================================= */

.woocommerce-cart .site-main,
.woocommerce-checkout .site-main,
.woocommerce-cart .container,
.woocommerce-checkout .container {
    padding-top: 0;
}

.hamoon-cart-hero,
.hamoon-checkout-hero {
    padding: 42px 0 26px;
    background: linear-gradient(180deg, #fff 0%, #fcf8f5 100%);
    border-bottom: 1px solid var(--hamoon-border);
}

.hamoon-cart-hero__eyebrow,
.hamoon-checkout-hero__eyebrow {
    margin: 0 0 8px;
    color: var(--hamoon-accent);
    font-weight: 700;
}

.hamoon-cart-hero__title,
.hamoon-checkout-hero__title {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--hamoon-text);
    line-height: 1.3;
}

.woocommerce table.shop_table {
    border: 1px solid var(--hamoon-border);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 26px rgba(32,29,26,.04);
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
    padding: 16px 14px;
    vertical-align: middle;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .button.alt,
.woocommerce button#place_order {
    min-height: 46px;
    border: 0;
    border-radius: 10px;
    background: var(--hamoon-accent);
    color: #fff;
    font-weight: 700;
    transition: background .25s ease, transform .25s ease;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce .button.alt:hover,
.woocommerce button#place_order:hover {
    background: var(--hamoon-accent-dark);
    color: #fff;
    transform: translateY(-1px);
}

.woocommerce .coupon .input-text,
.woocommerce .woocommerce-billing-fields input.input-text,
.woocommerce .woocommerce-shipping-fields input.input-text,
.woocommerce .woocommerce-additional-fields textarea,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    min-height: 46px;
    border: 1px solid var(--hamoon-border);
    border-radius: 10px;
    padding: 0 14px;
    background: #fff;
}

.woocommerce .woocommerce-additional-fields textarea {
    min-height: 140px;
    padding-top: 14px;
}

.woocommerce-cart-form .actions {
    padding-top: 18px;
}

.cart-collaterals {
    margin-top: 26px;
}

.cart_totals h2,
#order_review_heading {
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.woocommerce-checkout .woocommerce-info,
.woocommerce-checkout .woocommerce-message,
.woocommerce-cart .woocommerce-info,
.woocommerce-cart .woocommerce-message {
    border-radius: 12px;
}

.woocommerce form.checkout_coupon,
.woocommerce form.login,
.woocommerce form.register {
    border: 1px solid var(--hamoon-border);
    border-radius: 16px;
    background: #fff;
}

.woocommerce-checkout-review-order,
.woocommerce-billing-fields,
.woocommerce-shipping-fields,
.woocommerce-additional-fields {
    background: #fff;
    border: 1px solid var(--hamoon-border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 26px rgba(32,29,26,.04);
}

/* Iran-only checkout: hide country/region controls in both classic and block checkout. */
.woocommerce-checkout #billing_country_field,
.woocommerce-checkout #shipping_country_field,
.woocommerce-checkout #billing-country,
.woocommerce-checkout #shipping-country,
.wc-block-components-address-form__country,
.wc-block-components-address-form__state {
    display: none !important;
}

/* State/city selectors are supplied by WooCommerce Persian and remain visible. */
.woocommerce-checkout #billing_state_field,
.woocommerce-checkout #shipping_state_field,
.woocommerce-checkout #billing_city_field,
.woocommerce-checkout #shipping_city_field {
    display: block !important;
}

@media (max-width: 768px) {
    .woocommerce table.shop_table th,
    .woocommerce table.shop_table td {
        padding: 12px 10px;
    }
}
/* ==========================================================================
   Hamoon Sale Badge Styles
   ========================================================================== */
.woocommerce ul.products li.product .onsale.hamoon-sale-badge,
.woocommerce span.onsale.hamoon-sale-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    left: auto;
    min-height: auto;
    min-width: auto;
    padding: 4px 10px;
    background: linear-gradient(135deg, #e63946, #c1121f);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.35);
    z-index: 9;
    letter-spacing: 0;
    transition: transform 0.25s ease;
}

.woocommerce ul.products li.product:hover .onsale.hamoon-sale-badge {
    transform: scale(1.06);
}

/* در صفحه تکی محصول */
.woocommerce div.product span.onsale.hamoon-sale-badge {
    top: 15px;
    right: 15px;
    left: auto;
    font-size: 0.85rem;
    padding: 6px 14px;
}
/* About Page */
.about-page {
    direction: rtl;
    background: #fff;
    color: #222;
}

.about-page .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.about-hero {
    background: linear-gradient(135deg, #7b1f2a, #a73745);
    color: #fff;
    padding: 80px 20px;
    text-align: center;
}

.about-hero h1 {
    font-size: 34px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.about-hero p {
    font-size: 18px;
    line-height: 2;
    max-width: 800px;
    margin: 0 auto;
}

.about-content {
    padding: 60px 20px;
}

.about-box {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.about-box h2 {
    color: #7b1f2a;
    font-size: 24px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.about-box p {
    font-size: 16px;
    line-height: 2;
    color: #444;
    margin: 0;
}

/* Final mobile viewport guard: keep the RTL storefront full-width. */
@media (max-width: 768px) {
    html,
    body {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.hamoon-site > .site-header,
    body.hamoon-site > .site-main,
    body.hamoon-site > .site-footer,
    body.hamoon-site #primary,
    body.hamoon-site .container {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {
    .about-hero {
        padding: 60px 20px;
    }

    .about-hero h1 {
        font-size: 28px;
    }

    .about-hero p {
        font-size: 16px;
    }

    .about-content {
        padding: 40px 16px;
    }

    .about-box {
        padding: 22px;
    }

    .about-box h2 {
        font-size: 20px;
    }
}
@media only screen and (max-width: 768px) {
    html,
    body,
    body.hamoon-site,
    body.hamoon-site > header,
    body.hamoon-site > main,
    body.hamoon-site > footer,
    body.hamoon-site #primary,
    body.hamoon-site .site-header,
    body.hamoon-site .site-main,
    body.hamoon-site .site-footer,
    body.hamoon-site .container {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        transform: none !important;
        position: relative !important;
        right: auto !important;
        left: auto !important;
    }

    body.hamoon-site {
        overflow-x: hidden !important;
    }

    body.hamoon-site .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}
