/*
Theme Name: Dairy Shop
Theme URI: https://example.com/dairy-shop
Author: Dairy Shop Team
Author URI: https://example.com
Description: قالب اختصاصی، مدرن و Production-Ready وردپرس + ووکامرس برای فروشگاه محصولات لبنی، سنتی و محلی ایرانی. کاملاً RTL، ریسپانسیو، مبتنی بر Bootstrap 5.3 و Swiper.js.
Version: 1.2.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 7.4
WC requires at least: 8.0
WC tested up to: 11.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dairy-shop
Domain Path: /languages
Tags: e-commerce, rtl, custom-menu, translation-ready, food-and-drink

Dairy Shop is a custom production theme. All rights reserved to the project owner unless otherwise noted.
*/

/* =========================================================
   1. Design Tokens (CSS Custom Properties)
   ========================================================= */
:root {
    /* Brand colors */
    --ds-primary: #527D5E;
    --ds-primary-dark: #3F654A;
    --ds-primary-light: #EAF2EC;
    --ds-background: #F8FAF8;
    --ds-white: #FFFFFF;
    --ds-text: #202820;
    --ds-muted: #6C756D;
    --ds-border: #E3E9E4;
    --ds-accent: #D9B56D;

    /* Semantic colors */
    --ds-danger: #B3413A;
    --ds-success: #3F8F5C;
    --ds-warning: #C9922E;

    /* Radius / shadow (subtle & modern, per brief) */
    --ds-radius-sm: 6px;
    --ds-radius-md: 10px;
    --ds-radius-lg: 16px;
    --ds-shadow-sm: 0 1px 2px rgba(32, 40, 32, 0.06);
    --ds-shadow-md: 0 4px 16px rgba(32, 40, 32, 0.08);
    --ds-shadow-lg: 0 8px 28px rgba(32, 40, 32, 0.10);

    /* Typography */
    --ds-font-base: 'Vazirmatn', 'IRANSansX', Tahoma, sans-serif;
    --ds-fs-xs: 0.75rem;
    --ds-fs-sm: 0.875rem;
    --ds-fs-base: 1rem;
    --ds-fs-lg: 1.125rem;
    --ds-fs-xl: 1.375rem;
    --ds-fs-2xl: 1.75rem;
    --ds-fs-3xl: 2.25rem;

    /* Layout */
    --ds-header-height: 84px;
    --ds-header-height-mobile: 60px;
    /* Height of the top promo/menu bar (.ds-topbar) — only visible at lg+, same
       breakpoint where sticky sidebars matter. Sticky-positioned elements must add
       this on top of --ds-header-height, since the topbar scrolls up and sticks
       together WITH the main header row (both live inside the same sticky
       #ds-site-header), so the total visible sticky header is taller than
       --ds-header-height alone. */
    --ds-topbar-height: 44px;
    /* Height of the fixed mobile bottom nav bar (template-parts/header/mobile-bottom-nav.php,
       shown < lg only). Used to keep the sticky add-to-cart bar and the back-to-top
       button from overlapping it, and to keep page content from being hidden
       behind it — see the "< lg" rules in header.css and woocommerce.css. */
    --ds-mobile-navbar-height: 60px;
    --ds-transition: 0.2s ease-in-out;
    --bs-body-font-family: var(--ds-font-base);
}

/* =========================================================
   2. Base / Reset
   ========================================================= */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--ds-font-base);
    color: var(--ds-text);
    background-color: var(--ds-background);
    direction: rtl;
    text-align: right;
    font-size: var(--ds-fs-base);
    line-height: 1.7;
    overflow-x: hidden;
    max-width: 100%;
}

body.admin-bar {
    --ds-header-height: 84px;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--ds-transition);
}

a:hover,
a:focus {
    color: var(--ds-primary);
}

* {
    scrollbar-width: thin;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--ds-text);
    margin-bottom: 0.75rem;
}

::selection {
    background: var(--ds-primary-light);
    color: var(--ds-primary-dark);
}

/* Skip link (accessibility) */
.skip-link {
    position: absolute;
    right: -9999px;
    top: 0;
    z-index: 100000;
    background: var(--ds-primary);
    color: var(--ds-white);
    padding: 0.75rem 1.25rem;
    border-radius: 0 0 var(--ds-radius-sm) var(--ds-radius-sm);
}

.skip-link:focus {
    right: 1rem;
    color: var(--ds-white);
}

/* Focus visibility for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--ds-primary);
    outline-offset: 2px;
}

/* =========================================================
   3. Buttons
   ========================================================= */
.btn-ds-primary {
    background-color: var(--ds-primary);
    border: 1px solid var(--ds-primary);
    color: var(--ds-white);
    border-radius: var(--ds-radius-sm);
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    font-size: var(--ds-fs-sm);
    transition: background-color var(--ds-transition), transform var(--ds-transition);
}

.btn-ds-primary:hover,
.btn-ds-primary:focus {
    background-color: var(--ds-primary-dark);
    border-color: var(--ds-primary-dark);
    color: var(--ds-white);
    transform: translateY(-1px);
}

.btn-ds-outline {
    background-color: transparent;
    border: 1px solid var(--ds-primary);
    color: var(--ds-primary);
    border-radius: var(--ds-radius-sm);
    padding: 0.6rem 1.4rem;
    font-weight: 600;
    font-size: var(--ds-fs-sm);
    transition: all var(--ds-transition);
}

.btn-ds-outline:hover,
.btn-ds-outline:focus {
    background-color: var(--ds-primary);
    color: var(--ds-white);
}

/* =========================================================
   4. Layout helpers
   ========================================================= */
.full-width-section {
    width: 100%;
}

.section-spacing {
    padding-block: clamp(2rem, 5vw, 3rem);
}

.section-title {
    font-size: var(--ds-fs-2xl);
    margin-bottom: 1.75rem;
    position: relative;
}

/* On narrow phones, --ds-fs-2xl (28px) next to the "مشاهده همه" link in the
   same row (product/blog sliders — the ".section-title.mb-0" variant) was
   often wider than the available space, so either the heading text wrapped
   into the link's line or the whole row broke awkwardly. Sized down on
   mobile, plus a wrap fallback on the row itself in case a very long title +
   the link still don't both fit on one line even at the smaller size. */
@media (max-width: 575.98px) {
    .section-title {
        font-size: var(--ds-fs-xl);
    }

    .d-flex.justify-content-between:has(> .section-title) {
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }
}

.section-title .section-subtitle {
    display: block;
    font-size: var(--ds-fs-sm);
    font-weight: 500;
    color: var(--ds-muted);
    margin-bottom: 0.25rem;
}

/* Toast notifications are now handled entirely by the Toastify-js library (loaded
   sitewide in inc/enqueue.php); it manages its own container/positioning/stacking.
   See assets/js/theme.js (window.dairyShopToast) and .ds-toastify* in header.css for
   the small brand-color overrides layered on top of it. */

/* Slim top navigation progress (theme.js → initNavProgress). Fixed 3px line;
   does not shift layout. Inspired by common top-bar patterns (e.g. YouTube /
   Chrome load indicator / scroll-progress demos). */
.ds-nav-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 100000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.ds-nav-progress.is-active {
    opacity: 1;
    visibility: visible;
}

.ds-nav-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--ds-accent), var(--ds-primary));
    box-shadow: 0 0 8px rgba(217, 181, 109, 0.55);
    transition: width 0.25s ease-out;
    border-radius: 0 2px 2px 0;
}

/* Skeleton loading */
.ds-skeleton {
    background: linear-gradient(90deg, var(--ds-border) 25%, var(--ds-primary-light) 37%, var(--ds-border) 63%);
    background-size: 400% 100%;
    animation: ds-skeleton-loading 1.4s ease infinite;
    border-radius: var(--ds-radius-sm);
}

@keyframes ds-skeleton-loading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .ds-skeleton { animation: none; }
    * { transition: none !important; animation-duration: 0.01ms !important; }
}

.added_to_cart{
    display: none;
}