/* ==========================================================================
   WordPress-specific styles (top bar, blog, woocommerce, widgets)
   ========================================================================== */

/* ---------- TOP BAR ---------- */
.top-bar {
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-muted);
}
.top-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.top-bar-info { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.top-bar-info span { color: var(--text-muted); }
.top-bar-info a {
    color: var(--gold);
    transition: color 0.3s;
}
.top-bar-info a:hover {
    color: var(--gold-light);
    text-decoration: underline;
}
.top-bar-hours { color: var(--text-muted) !important; font-size: 12px; }
@media (max-width: 700px) {
    .top-bar-hours { display: none; }
    .top-bar-info { gap: 14px; justify-content: center; width: 100%; }
}
.top-bar-socials { display: flex; gap: 8px; }
.top-bar-socials a {
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--gold-soft);
    border-radius: 50%;
    transition: all 0.3s;
}
.top-bar-socials a:hover {
    background: var(--gold);
    transform: translateY(-2px);
}

/* ---------- CART ICON ---------- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}
.barsad-cart-icon {
    position: relative;
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--gold-soft);
    border: 1px solid var(--border);
    border-radius: 50%;
    transition: all 0.3s;
    font-size: 18px;
}
.barsad-cart-icon:hover { background: var(--gold); transform: scale(1.08); }
.barsad-cart-icon .cart-count {
    position: absolute;
    top: -4px; left: -4px;
    background: var(--gold);
    color: var(--bg-dark);
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    padding: 0 5px;
}

/* ---------- BLOG / ARCHIVE / PAGES ---------- */
.site-main {
    padding-top: 140px;
    padding-bottom: 80px;
    min-height: 60vh;
}
.content-area {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}
@media (max-width: 900px) { .content-area { grid-template-columns: 1fr; } }

.archive-header, .page-header, .entry-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}
.archive-title, .page-title, .entry-title {
    font-size: 2.2rem;
    color: var(--gold);
    margin: 0 0 8px 0;
}
.entry-meta, .post-meta {
    display: flex; gap: 16px; flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.4s;
}
.post-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold);
    box-shadow: var(--shadow-gold);
}
.post-thumb img { width: 100%; height: 200px; object-fit: cover; }
.post-content { padding: 20px; }
.post-title { font-size: 1.25rem; margin: 0 0 12px 0; }
.post-title a { color: var(--text); transition: color 0.3s; }
.post-title a:hover { color: var(--gold); }
.post-excerpt { color: var(--text-muted); font-size: 0.92rem; margin: 12px 0; }
.read-more {
    display: inline-block;
    color: var(--gold);
    font-weight: 600;
    margin-top: 10px;
}
.read-more:hover { color: var(--gold-light); }

.single-post .entry-thumb img,
.single-page .page-thumb img {
    width: 100%; height: auto; border-radius: var(--radius);
    margin-bottom: 24px;
}
.entry-content, .page-content {
    color: var(--text);
    line-height: 1.9;
    font-size: 1.05rem;
}
.entry-content h2, .page-content h2 { color: var(--gold); margin: 30px 0 16px; }
.entry-content a, .page-content a { color: var(--gold); }
.entry-content blockquote, .page-content blockquote {
    border-right: 4px solid var(--gold);
    padding: 16px 24px;
    background: var(--bg-card);
    margin: 20px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.post-nav {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    gap: 16px;
}
.post-nav a {
    flex: 1;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-muted);
    transition: all 0.3s;
}
.post-nav a:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- SIDEBAR / WIDGETS ---------- */
.sidebar {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    height: fit-content;
}
.widget { margin-bottom: 28px; }
.widget:last-child { margin-bottom: 0; }
.widget-title, .footer-widget-title {
    color: var(--gold);
    font-size: 1.1rem;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}
.widget ul { padding: 0; }
.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-muted);
}
.widget ul li a { color: var(--text-muted); transition: color 0.3s; }
.widget ul li a:hover { color: var(--gold); padding-right: 6px; }

.widget input[type="search"],
.widget input[type="text"],
.widget input[type="email"] {
    width: 100%;
    background: var(--bg-darker);
    color: var(--text);
    border: 1px solid var(--border-light);
    padding: 10px 14px;
    border-radius: 8px;
    font-family: inherit;
}
.widget input:focus { border-color: var(--gold); outline: none; }

/* ---------- SEARCH FORM ---------- */
.search-form {
    display: flex;
    gap: 8px;
}
.search-form input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text);
    padding: 12px 16px;
    border-radius: 10px;
    font-family: inherit;
}
.search-form button {
    background: var(--gold);
    color: var(--bg-dark);
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 18px;
}

/* ---------- COMMENTS ---------- */
.comments-area {
    margin-top: 60px;
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}
.comments-title { color: var(--gold); margin-bottom: 24px; }
.comments-list { list-style: none; padding: 0; }
.comment-body {
    padding: 20px;
    background: var(--bg-card-light);
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.comment-author {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 12px;
}
.comment-author img { border-radius: 50%; }
.comment-author cite { color: var(--gold); font-style: normal; font-weight: 700; }
.comment-date { color: var(--text-muted); font-size: 0.85rem; }
.comment-content { color: var(--text); }
.comment-actions { margin-top: 12px; }
.comment-actions a { color: var(--gold); font-size: 0.88rem; }

.comment-form input, .comment-form textarea {
    background: var(--bg-darker) !important;
    color: var(--text) !important;
    border: 1px solid var(--border-light) !important;
    padding: 12px !important;
    border-radius: 8px !important;
    width: 100% !important;
    font-family: inherit !important;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--gold) !important; }
.comment-form label { color: var(--gold); display: block; margin-bottom: 6px; }
.comment-form .form-submit input {
    background: var(--gold) !important;
    color: var(--bg-dark) !important;
    width: auto !important;
    padding: 12px 32px !important;
    font-weight: 700 !important;
    cursor: pointer;
}

/* ---------- FOOTER WIDGETS ---------- */
.footer-widget { color: var(--text-muted); }
.footer-widget ul { padding: 0; }
.footer-widget ul li {
    padding: 6px 0;
    list-style: none;
}
.footer-widget a { color: var(--text-muted); transition: color 0.3s; }
.footer-widget a:hover { color: var(--gold); }

.footer-socials { display: flex; gap: 10px; margin-top: 14px; }
.footer-socials a {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--gold-soft);
    border-radius: 50%;
    transition: all 0.3s;
}
.footer-socials a:hover { background: var(--gold); transform: translateY(-3px); }

.footer-menu { padding: 0; }
.footer-menu li { padding: 6px 0; list-style: none; }
.footer-menu li a { color: var(--text-muted); }
.footer-menu li a:hover { color: var(--gold); }

/* ---------- WOOCOMMERCE ---------- */
.woo-container { padding-top: 30px; }
.woocommerce ul.products li.product {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px !important;
    transition: all 0.3s;
}
.woocommerce ul.products li.product:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: var(--shadow-gold);
}
.woocommerce ul.products li.product .woocommerce-loop-product__title { color: var(--text) !important; }
.woocommerce ul.products li.product .price { color: var(--gold) !important; font-weight: 700; }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit {
    background: var(--gold) !important;
    color: var(--bg-dark) !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-weight: 700 !important;
    transition: all 0.3s !important;
}
.woocommerce a.button:hover, .woocommerce button.button:hover {
    background: var(--gold-light) !important;
    transform: translateY(-2px);
}
.woocommerce .star-rating span { color: var(--gold); }
.woocommerce-message, .woocommerce-info {
    background: var(--bg-card) !important;
    border-top-color: var(--gold) !important;
    color: var(--text) !important;
}

.shop-sidebar {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

/* ---------- CONTACT MAP ---------- */
.contact-map {
    margin-top: 40px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}
.contact-map iframe { width: 100%; height: 350px; border: 0; display: block; }

/* ---------- WP standard classes ---------- */
.alignleft  { float: left; margin: 0 0 1em 1em; }
.alignright { float: right; margin: 0 1em 1em 0; }
.aligncenter { display: block; margin: 0 auto 1em auto; }
.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; position: relative; right: 50%; margin-right: -50vw; }

.wp-caption {
    max-width: 100%;
    background: var(--bg-card);
    padding: 8px;
    border-radius: var(--radius);
}
.wp-caption-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    padding: 8px;
}
.screen-reader-text {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
}

#preloader { display: none !important; }


/* ===== 3.5: لینک پرش به محتوا (دسترس‌پذیری - با Tab ظاهر می‌شود) ===== */
.skip-link.screen-reader-text:focus {
    clip: auto !important;
    clip-path: none;
    width: auto;
    height: auto;
    position: fixed !important;
    top: 12px;
    right: 12px;
    z-index: 100001;
    padding: 12px 20px;
    background: var(--gold, #c9a14a);
    color: #0a0a0a;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.site-main-wrap:focus { outline: none; }
/* فوکوس قابل مشاهده برای کاربران صفحه‌کلید */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--gold-light, #e8c476);
    outline-offset: 2px;
}

/* ===== 3.5: مسیر صفحه (Breadcrumb) - همه صفحات ===== */
.barsad-breadcrumb { margin: 0 0 16px; font-size: 0.88rem; }
.barsad-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 0;
    list-style: none;
    margin: 0;
    padding: 0;
}
.barsad-breadcrumb li { display: inline-flex; align-items: center; color: var(--text-muted, #a0a0a0); }
.barsad-breadcrumb li + li::before {
    content: "‹";
    margin: 0 10px;
    color: var(--gold, #c9a14a);
    opacity: 0.8;
}
.barsad-breadcrumb a { color: var(--gold, #c9a14a); text-decoration: none; }
.barsad-breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.barsad-breadcrumb [aria-current="page"] {
    color: var(--text, #f5f5f5);
    max-width: 60ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* لوگوی غیرمربعی در کادر دایره‌ای کشیده نشود */
.logo-img, .footer-logo { object-fit: cover; }
