@font-face {
    font-family: "Vazirmatn";
    src: url("/lib/fonts/vazirmatn/Vazirmatn-Variable.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--as-font);
    background-color: var(--as-bg-soft);
    color: var(--as-text);
    font-size: 0.95rem;
}

a {
    color: var(--as-charcoal);
    text-decoration: none;
}

a:hover {
    color: var(--as-gold-dark);
}

.container-narrow {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ---------- Buttons ---------- */
.btn-gold {
    background-color: var(--as-gold);
    border-color: var(--as-gold);
    color: #fff;
}
.btn-gold:hover, .btn-gold:focus {
    background-color: var(--as-gold-dark);
    border-color: var(--as-gold-dark);
    color: #fff;
}
.btn-outline-gold {
    border: 1px solid var(--as-gold);
    color: var(--as-gold-dark);
    background: transparent;
}
.btn-outline-gold:hover {
    background-color: var(--as-gold);
    color: #fff;
}
.btn-charcoal {
    background-color: var(--as-charcoal);
    border-color: var(--as-charcoal);
    color: #fff;
}
.btn-charcoal:hover {
    background-color: var(--as-charcoal-soft);
    border-color: var(--as-charcoal-soft);
    color: #fff;
}

/* ---------- Top utility bar ---------- */
.top-bar {
    background-color: var(--as-charcoal);
    color: #cfcfcf;
    font-size: 0.8rem;
}
.top-bar a {
    color: #cfcfcf;
}
.top-bar a:hover {
    color: var(--as-gold-light);
}

/* ---------- Header ---------- */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--as-border);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.site-logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--as-charcoal);
    display: flex;
    align-items: center;
    gap: .5rem;
}
.site-logo img {
    max-height: 46px;
}
.site-logo .brand-gold {
    color: var(--as-gold);
}

.site-search input {
    border-radius: var(--as-radius) 0 0 var(--as-radius);
    border-color: var(--as-border);
}
.site-search button {
    border-radius: 0 var(--as-radius) var(--as-radius) 0;
}

.header-icon-link {
    position: relative;
    color: var(--as-charcoal);
    font-size: 1.35rem;
}
.header-icon-link .badge-count {
    position: absolute;
    top: -6px;
    inset-inline-start: -8px;
    background: var(--as-gold);
    color: #fff;
    font-size: 0.65rem;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Main navigation / mega menu ---------- */
.main-nav {
    background: var(--as-charcoal);
}
.main-nav .nav-link {
    color: #f0f0f0;
    padding: .75rem 1rem;
    font-size: .92rem;
}
.main-nav .nav-link:hover,
.main-nav .nav-item.dropdown:hover > .nav-link {
    color: var(--as-gold-light);
    background: rgba(255,255,255,.05);
}
.main-nav .dropdown-menu {
    border: none;
    border-radius: 0 0 var(--as-radius) var(--as-radius);
    box-shadow: var(--as-shadow-lg);
    padding: 1rem;
}
.main-nav .dropdown-item {
    border-radius: var(--as-radius-sm);
    padding: .45rem .75rem;
}
.main-nav .dropdown-item:hover {
    background: var(--as-gold-light);
    color: var(--as-gold-dark);
}

/* ---------- Hero slider ---------- */
.hero-slider {
    border-radius: var(--as-radius);
    overflow: hidden;
}
.hero-slide {
    position: relative;
    min-height: 260px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}
.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(38,36,34,.65), rgba(38,36,34,0));
}
.hero-slide-content {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 2.5rem;
    max-width: 480px;
}
.hero-slide-content h2 {
    font-weight: 800;
}

/* ---------- Section heading ---------- */
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.section-heading h2 {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
    position: relative;
    padding-inline-start: .8rem;
    border-inline-start: 4px solid var(--as-gold);
}
.section-heading .see-all {
    font-size: .85rem;
    color: var(--as-gold-dark);
}

/* ---------- Category grid ---------- */
.category-tile {
    background: #fff;
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    text-align: center;
    padding: 1.1rem .6rem;
    display: block;
    transition: box-shadow .15s, transform .15s;
    height: 100%;
}
.category-tile:hover {
    box-shadow: var(--as-shadow);
    transform: translateY(-3px);
}
.category-tile img {
    width: 62px;
    height: 62px;
    object-fit: contain;
    margin-bottom: .5rem;
}
.category-tile .cat-name {
    font-size: .85rem;
    font-weight: 600;
    color: var(--as-text);
}

/* ---------- Product card ---------- */
.product-card {
    background: #fff;
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s, transform .15s;
}
.product-card:hover {
    box-shadow: var(--as-shadow-lg);
    transform: translateY(-3px);
}
.product-card .product-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--as-bg-soft);
}
.product-card .product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: .75rem;
}
.product-card .discount-badge {
    position: absolute;
    top: .5rem;
    inset-inline-start: .5rem;
    background: var(--as-red);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: var(--as-radius-sm);
}
.product-card .wishlist-btn {
    position: absolute;
    top: .5rem;
    inset-inline-end: .5rem;
    background: #fff;
    border: 1px solid var(--as-border);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--as-text-muted);
}
.product-card .wishlist-btn:hover {
    color: var(--as-red);
}
.product-card .product-body {
    padding: .85rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    flex: 1;
}
.product-card .product-title {
    font-size: .88rem;
    font-weight: 600;
    color: var(--as-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}
.product-card .product-price-row {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    gap: .4rem;
    flex-wrap: wrap;
}
.product-card .price-old {
    text-decoration: line-through;
    color: var(--as-text-muted);
    font-size: .78rem;
}
.product-card .price-final {
    font-weight: 800;
    color: var(--as-charcoal);
    font-size: 1rem;
}
.product-card .price-final small,
.price-toman-unit {
    font-size: .7rem;
    font-weight: 400;
    color: var(--as-text-muted);
}
.product-card .btn-add-cart {
    width: 100%;
}
.catalog-only-note {
    font-size: .75rem;
    color: var(--as-text-muted);
    background: var(--as-bg-soft);
    border: 1px dashed var(--as-border);
    border-radius: var(--as-radius-sm);
    padding: .4rem .6rem;
    text-align: center;
}

/* ---------- Info cards (catalogs / honors / gallery / blog) ---------- */
.info-card {
    background: var(--as-charcoal);
    color: #fff;
    border-radius: var(--as-radius);
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.info-card i {
    font-size: 1.8rem;
    color: var(--as-gold-light);
}
.info-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}
.info-card p {
    font-size: .82rem;
    color: #c9c9c9;
    margin: 0;
}
.info-card a {
    color: var(--as-gold-light);
    font-size: .82rem;
    margin-top: auto;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--as-charcoal);
    color: #c9c9c9;
    margin-top: 3rem;
}
.site-footer h5 {
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.site-footer a {
    color: #c9c9c9;
    font-size: .85rem;
    line-height: 2.1;
}
.site-footer a:hover {
    color: var(--as-gold-light);
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    font-size: .8rem;
    padding: 1rem 0;
    color: #9c9c9c;
}
.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    margin-inline-end: .4rem;
}
.social-icons a:hover {
    background: var(--as-gold-light);
    color: var(--as-charcoal);
}
.trust-seals img {
    height: 68px;
    background: #fff;
    border-radius: var(--as-radius-sm);
    padding: 4px;
}

/* ---------- Breadcrumb ---------- */
.as-breadcrumb {
    background: var(--as-bg-soft);
    border-bottom: 1px solid var(--as-border);
    padding: .6rem 0;
    font-size: .82rem;
    color: var(--as-text-muted);
}

/* ---------- Sidebar filters ---------- */
.filter-card {
    background: #fff;
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    padding: 1rem;
}
.filter-card h6 {
    font-weight: 700;
    font-size: .85rem;
    margin-bottom: .6rem;
}

/* ---------- Product detail ---------- */
.product-gallery-main {
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}
.product-gallery-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.product-gallery-thumb {
    width: 64px;
    height: 64px;
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-sm);
    object-fit: contain;
    padding: 4px;
    background: #fff;
    cursor: pointer;
}
.product-gallery-thumb.active {
    border-color: var(--as-gold);
}
.variant-swatch {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--as-border);
    cursor: pointer;
    display: inline-block;
}
.variant-swatch.active {
    border-color: var(--as-gold);
}
.variant-pill {
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-sm);
    padding: .3rem .8rem;
    font-size: .82rem;
    cursor: pointer;
}
.variant-pill.active {
    border-color: var(--as-gold);
    background: var(--as-gold-light);
    color: var(--as-gold-dark);
}

/* ---------- Star rating ---------- */
.star-rating i {
    color: var(--as-star);
}

/* ---------- Auth forms ---------- */
.auth-card {
    background: #fff;
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    box-shadow: var(--as-shadow);
    padding: 2rem;
    max-width: 440px;
    margin: 2.5rem auto;
}

/* ---------- Generic content card (shared look with the admin panel's admin-card) ---------- */
.admin-card {
    background: #fff;
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    box-shadow: var(--as-shadow);
}
/* Plain class selectors (not ".admin-card .admin-card-body") on purpose — almost every
   view puts both "admin-card" and "admin-card-body" on the very same element, so a
   descendant combinator here would never match and the card's inner padding would be
   silently lost, leaving text flush against the border. */
.admin-card-header {
    padding: 1rem 1.35rem;
    border-bottom: 1px solid var(--as-border);
    font-weight: 700;
    font-size: .92rem;
}
.admin-card-body {
    padding: 1.35rem;
}
@media (max-width: 575.98px) {
    .admin-card-body {
        padding: 1.1rem;
    }
}

/* ---------- My-account sidebar ---------- */
.account-nav .nav-link {
    color: var(--as-text);
    border-radius: var(--as-radius-sm);
    padding: .6rem .8rem;
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.account-nav .nav-link:hover {
    background: var(--as-gold-light);
}
.account-nav .nav-link.active {
    background: var(--as-gold);
    color: #fff;
}

/* ---------- Blog cards ---------- */
.blog-card {
    display: block;
    background: #fff;
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    overflow: hidden;
    box-shadow: var(--as-shadow);
    color: var(--as-text);
    height: 100%;
}
.blog-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.blog-card-body {
    padding: 1rem;
}

/* ---------- Gallery ---------- */
.gallery-thumb {
    overflow: hidden;
    border-radius: var(--as-radius-sm);
}

/* ---------- Static / blog rich content ---------- */
.content-html {
    line-height: 2;
    font-size: .95rem;
}
.content-html img {
    max-width: 100%;
    border-radius: var(--as-radius-sm);
}

/* ---------- Misc ---------- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--as-text-muted);
}
.empty-state i {
    font-size: 3rem;
    color: var(--as-border);
}
