/*
Theme Name: TopTheme
Theme URI: https://example.com/toptheme
Author: Your Name
Author URI: https://example.com
Description: یک قالب وردپرس مدرن و ریسپانسیو با پشتیبانی کامل از ووکامرس برای فروشگاه‌های آنلاین
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: toptheme
Tags: e-commerce, woocommerce, responsive, modern, custom-menu, featured-images, threaded-comments, translation-ready

TopTheme یک قالب وردپرس با پشتیبانی کامل از ووکامرس است.
*/

/* ============================================
   Font Face - IranSans
   ============================================ */

@font-face {
    font-family: 'IRANSans';
    src: url('fonts/IRANSansWeb.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* بهینه‌سازی لود فونت - نمایش فونت fallback تا زمان لود فونت اصلی */
}

/* ============================================
   CSS Variables
   ============================================ */

:root {
    --font-primary: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: #000;
    background-color: #EFEFEF;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

#page {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Container - Mobile First (Standard WordPress Container) */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
        padding-left: 30px;
        padding-right: 30px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
        padding-left: 30px;
        padding-right: 30px;
    }
}

/* XXL devices (larger desktops, 1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
        padding-left: 40px;
        padding-right: 40px;
    }
}

/* Container Fluid - Full Width */
.container-fluid {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

/* Header styles moved to assets/css/header.css */

/* Main Content */
.site-main {
    min-height: 60vh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Footer */
.site-footer {
    background: #000;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget h3 {
    margin-bottom: 15px;
    color: #FFB22C;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-widget a:hover {
    color: #FFB22C;
}

.site-info {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* WooCommerce Styles - Mobile First */
.woocommerce {
    max-width: 100%;
}

.woocommerce ul.products {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Tablet and up */
@media (min-width: 576px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Desktop and up */
@media (min-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

/* Large Desktop */
@media (min-width: 992px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}

.woocommerce ul.products li.product {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.woocommerce ul.products li.product img {
    width: 100%;
    height: auto;
    display: block;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    padding: 15px;
    margin: 0;
    font-size: 18px;
}

.woocommerce ul.products li.product .price {
    padding: 0 15px 15px;
    color: #FFB22C;
    font-weight: bold;
    font-size: 20px;
}

.woocommerce ul.products li.product .button {
    margin: 0 15px 15px;
    background: #FFB22C;
    color: #000;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
    font-weight: 600;
}

.woocommerce ul.products li.product .button:hover {
    background: #e6a025;
    color: #000;
}

/* Post Styles */
.posts-container {
    display: grid;
    gap: 30px;
}

.post-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.post-thumbnail {
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.post-item:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    padding: 20px;
}

.entry-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.entry-title a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
}

.entry-title a:hover {
    color: #FFB22C;
}

.entry-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.entry-meta span {
    margin-left: 15px;
}

.entry-summary {
    margin-bottom: 15px;
    line-height: 1.8;
}

.read-more {
    display: inline-block;
    color: #FFB22C;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.read-more:hover {
    color: #e6a025;
}

/* Single Post Styles */
.single-post {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.single-post .entry-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #fcefdb;
}

.single-post .entry-title {
    font-size: 32px;
    margin-bottom: 15px;
}

.single-post .entry-content {
    line-height: 1.8;
    font-size: 16px;
}

.single-post .entry-content p {
    margin-bottom: 20px;
}

.single-post .entry-content h2,
.single-post .entry-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #000;
}

/* Page Styles */
.page-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Pagination */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination .nav-links {
    display: inline-flex;
    gap: 10px;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    background: #fff;
    border-radius: 5px;
    text-decoration: none;
    color: #000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.pagination a:hover {
    background: #FFB22C;
    color: #000;
}

.pagination .current {
    background: #FFB22C;
    color: #000;
}

/* Post Navigation */
.post-navigation {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #fcefdb;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-previous a,
.nav-next a {
    color: #FFB22C;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-previous a:hover,
.nav-next a:hover {
    color: #e6a025;
}

/* Sidebar */
.sidebar {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 40px;
}

.widget {
    margin-bottom: 30px;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 20px;
    margin-bottom: 15px;
    color: #000;
    padding-bottom: 10px;
    border-bottom: 2px solid #fcefdb;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid #fcefdb;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
}

.widget a:hover {
    color: #FFB22C;
}

/* Error 404 */
.error-404 {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.error-404 .page-title {
    font-size: 48px;
    color: #e74c3c;
    margin-bottom: 20px;
}

.error-404-actions {
    margin: 30px 0;
}

.error-404-actions .button {
    display: inline-block;
    padding: 12px 30px;
    background: #FFB22C;
    color: #000;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
    font-weight: 600;
}

.error-404-actions .button:hover {
    background: #e6a025;
    color: #000;
}

.error-404-search,
.error-404-recent-posts {
    margin-top: 40px;
    text-align: right;
}

.error-404-recent-posts ul {
    list-style: none;
    text-align: right;
}

.error-404-recent-posts li {
    padding: 10px 0;
    border-bottom: 1px solid #fcefdb;
}

/* Header Cart */
.header-cart {
    position: relative;
}


.cart-icon {
    font-size: 20px;
}

.cart-count {
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* WooCommerce Additional Styles */
.woocommerce-products-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #fcefdb;
}

.woocommerce-products-header__title {
    font-size: 32px;
    color: #000;
}

.woocommerce-breadcrumb {
    margin-bottom: 20px;
    font-size: 13px!important;
    color: #666;
}

.woocommerce-breadcrumb a {
    color: #FFB22C;
    text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
    color: #e6a025;
    text-decoration: underline;
}

/* Posts Container - Mobile First */
.posts-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Tablet and up */
@media (min-width: 768px) {
    .posts-container {
        gap: 30px;
    }
}

/* Single Post - Mobile First */
.single-post,
.page-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Tablet and up */
@media (min-width: 768px) {
    .single-post,
    .page-content {
        padding: 30px;
    }
}

.single-post .entry-title {
    font-size: 24px;
}

/* Tablet and up */
@media (min-width: 768px) {
    .single-post .entry-title {
        font-size: 32px;
    }
}

/* Navigation Links - Mobile First */
.nav-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Tablet and up */
@media (min-width: 768px) {
    .nav-links {
        flex-direction: row;
        justify-content: space-between;
        gap: 20px;
    }
}

/* Footer Content - Mobile First */
.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Tablet and up */
@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop and up */
@media (min-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Search styles moved to assets/css/header.css */

