/*
Theme Name: Gosary Classic
Theme URI: https://gosary.com
Author: Your Name
Author URI: https://yourwebsite.com
Description: A classic WordPress theme for the Gosary coffee website, focusing on tutorials, a blog, and a shop.
Version: 1.0.5
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gosary-classic
Tags: custom-background, e-commerce, blog, one-column, classic
*/

/* --- General & Typography --- */
body {
    font-family: 'Lato', sans-serif;
    color: #333333;
    background-color: #F8F5F2;
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3, h4, h5, h6 { font-family: 'Playfair Display', serif; color: #4A2C2A; font-weight: 700; }
a { color: #C19A6B; text-decoration: none; transition: color 0.3s ease; }
a:hover { color: #4A2C2A; }
img { max-width: 100%; height: auto; }

/* --- Header & Navigation --- */
.site-header { background-color: #fff; padding: 10px 0; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 1000; }
.header-container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.site-branding .site-title a { font-family: 'Playfair Display', serif; font-size: 28px; color: #4A2C2A; font-weight: bold; }
.site-branding .site-title .persian-name { font-size: 16px; font-weight: normal; display: block; color: #888; }
.main-navigation ul { margin: 0; padding: 0; list-style: none; display: flex; gap: 25px; }
.main-navigation ul li a { font-family: 'Lato', sans-serif; text-transform: uppercase; font-size: 14px; letter-spacing: 1px; color: #555; font-weight: bold; padding-bottom: 5px; border-bottom: 2px solid transparent; transition: all 0.3s ease; }
.main-navigation ul li a:hover, .main-navigation ul li.current-menu-item a { color: #4A2C2A; border-bottom-color: #C19A6B; }

/* --- General Section Styling --- */
.front-page-section { padding: 80px 0; text-align: center; }
.section-title { font-size: 2.5rem; margin-bottom: 40px; position: relative; display: inline-block; }
.section-title::after { content: ''; display: block; width: 60px; height: 3px; background-color: #C19A6B; margin: 15px auto 0; }
.btn { display: inline-block; padding: 12px 28px; font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; border: 2px solid; transition: all 0.3s ease; font-weight: bold; }
.btn-primary { background-color: #C19A6B; border-color: #C19A6B; color: #fff; }
.btn-primary:hover { background-color: #4A2C2A; border-color: #4A2C2A; color: #fff; }

/* ==============================================
MAGAZINE PAGE & SHARED STYLES (`mag.php`)
==============================================
*/

/* --- Featured Posts Section --- */
.featured-posts-section {
    padding: 40px 0;
    background-color: #fff;
    border-bottom: 1px solid #eee;
}
.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Left Column: Slideshow */
.posts-slideshow {
    position: relative;
    overflow: hidden;
    min-height: 500px;
    background-color: #4A2C2A;
}
.slide { display: none; animation: fadeIn 0.8s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.slide-link { display: block; position: relative; color: #fff; }
.slide-image { width: 100%; height: 500px; object-fit: cover; display: block; }
.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.9) 10%, rgba(10, 10, 10, 0.7) 50%, transparent 100%);
}
.slide-title { font-size: 2.5rem; color: #fff; margin: 0 0 10px 0; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.slide-excerpt { font-family: 'Lato', sans-serif; font-size: 1.1rem; line-height: 1.6; color: #f0f0f0; text-shadow: 0 1px 2px rgba(0,0,0,0.7); }
.slide-nav { position: absolute; top: 50%; transform: translateY(-50%); background-color: rgba(255,255,255,0.8); color: #333; border: none; padding: 10px 15px; font-size: 20px; cursor: pointer; transition: background-color 0.3s ease; z-index: 10; }
.slide-nav:hover { background-color: #fff; }
.prev-slide { left: 10px; }
.next-slide { right: 10px; }

/* Right Column: Latest Posts */
.latest-posts-list { display: flex; flex-direction: column; gap: 15px; }
.latest-post-item { display: flex; align-items: center; gap: 15px; background-color: #fff; border: 1px solid #eee; padding: 10px; transition: background-color 0.3s ease, border-color 0.3s ease; }
.latest-post-item:hover { background-color: #f5f0eb; }
.latest-post-item .post-item-thumbnail img { width: 80px; height: 80px; object-fit: cover; display: block; }
.latest-post-item .post-item-title { font-family: 'Lato', sans-serif; font-size: 1rem; font-weight: bold; color: #4A2C2A; margin: 0; line-height: 1.4; }

/* Active state for the post list item */
.latest-post-item.active-post-item {
    background-color: #eaddd7;
    border-color: #C19A6B;
}

/* --- Hero Section (Magazine) --- */
.hero-section { background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('images/hero-background.jpg'); background-size: cover; background-position: center; color: #fff; text-align: center; padding: 150px 20px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.hero-section h1 { font-size: 4rem; color: #fff; margin-top: 0; margin-bottom: 1rem; max-width: 800px; }
.hero-section p { font-size: 1.25rem; max-width: 600px; margin-bottom: 2rem; }
.hero-buttons .btn { border-color: #fff; color: #fff; margin: 0 10px; }
.hero-buttons .btn-primary { background-color: #C19A6B; border-color: #C19A6B; }
.hero-buttons .btn:hover { background-color: #fff; color: #333; }

/* --- Pillars Section (Magazine) --- */
.pillars-container { display: flex; justify-content: space-around; gap: 40px; text-align: center; flex-wrap: wrap; }
.pillar { flex: 1; max-width: 300px; }
.pillar h3 { font-size: 1.8rem; margin-bottom: 15px; }
.pillar p { color: #666; }
.pillar-link { font-weight: bold; text-transform: uppercase; font-size: 14px; letter-spacing: 1px; }

/* --- Blog Grid (Magazine) --- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.blog-card { background: #fff; border: 1px solid #eee; text-align: left; transition: box-shadow 0.3s ease, transform 0.3s ease; }
.blog-card:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.08); transform: translateY(-5px); }
.blog-card .card-image img { width: 100%; height: auto; display: block; }
.blog-card .card-content { padding: 25px; }
.blog-card h4 { font-size: 1.3rem; margin-top: 0; }
.blog-card .card-content a { color: #4A2C2A; }
.blog-card .card-meta { font-size: 0.9rem; color: #888; margin-bottom: 10px; }

/* ==============================================
NEW SHOP-FOCUSED FRONT PAGE STYLES
==============================================
*/
/* --- Shop Hero Section --- */
.shop-hero-section { color: #fff; background-size: cover; background-position: center; padding: 120px 0; display: flex; align-items: center; text-align: left; }
.shop-hero-section .container { position: relative; z-index: 2; }
.shop-hero-section .hero-content { background: rgba(0,0,0,0.5); padding: 40px; max-width: 550px; }
.shop-hero-section .hero-subtitle { font-family: 'Lato', sans-serif; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 2px; color: #C19A6B; margin: 0; }
.shop-hero-section .hero-title { font-size: 3.5rem; color: #fff; margin: 10px 0 20px 0; line-height: 1.1; }
.shop-hero-section .hero-description { font-size: 1.1rem; margin-bottom: 30px; }
/* --- Why Us Section --- */
.why-us-section { background-color: #F8F5F2; padding: 60px 0; }
.why-us-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; }
.feature-item { text-align: center; }
.feature-item .feature-icon svg { color: #C19A6B; margin-bottom: 15px; }
.feature-item h3 { font-size: 1.5rem; }
/* --- Product Categories --- */
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.category-card { position: relative; display: block; height: 350px; background-size: cover; background-position: center; color: #fff; text-decoration: none; overflow: hidden; }
.category-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.3); transition: background 0.4s ease; }
.category-card:hover::before { background: rgba(0,0,0,0.5); }
.category-card .category-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 25px; z-index: 2; }
.category-card h3 { color: #fff; font-size: 2rem; margin: 0; }
/* --- WooCommerce Product Grid & Cards --- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-top: 40px; }
ul.products { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important; gap: 30px !important; }
.woocommerce ul.products li.product, .product-card { list-style: none !important; margin: 0 !important; padding: 0 !important; text-align: center; background: #fff; border: 1px solid #eee; }
.woocommerce ul.products li.product a img { margin: 0 !important; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 1.2rem; padding: 0 15px; }
.woocommerce ul.products li.product .price { color: #4A2C2A; font-weight: bold; padding: 5px 15px; }
.woocommerce ul.products li.product .button { background-color: #4A2C2A !important; color: #fff !important; margin-top: 10px !important; margin-bottom: 20px !important; }
span.onsale { background-color: #C19A6B !important; }
/* --- Newsletter Section --- */
.newsletter-signup { background-color: #4A2C2A; color: #fff; }
.newsletter-signup h2 { color: #fff; }
.newsletter-signup p { max-width: 500px; margin-left: auto; margin-right: auto; opacity: 0.9; }
.newsletter-form { margin-top: 30px; max-width: 500px; margin-left: auto; margin-right: auto; display: flex; }
.newsletter-form input[type="email"] { flex-grow: 1; padding: 15px; border: 1px solid #C19A6B; background: #fff; font-size: 16px; }
.newsletter-form button { padding: 15px 30px; border: none; background-color: #C19A6B; color: #4A2C2A; font-size: 16px; text-transform: uppercase; font-weight: bold; cursor: pointer; }
/* --- Footer --- */
.site-footer { background-color: #2d1a19; color: #ddd; padding: 60px 0 20px 0; font-size: 15px; }
.footer-container { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 40px; }
.footer-widget { flex: 1; min-width: 220px; }
.footer-widget h4 { color: #fff; font-size: 1.2rem; }
.footer-widget ul { list-style: none; padding: 0; }
.footer-widget ul li { margin-bottom: 10px; }
.footer-widget ul li a { color: #ccc; }
.footer-widget ul li a:hover { color: #fff; }
.footer-bottom { text-align: center; border-top: 1px solid #444; padding-top: 20px; color: #888; font-size: 14px; }

/* --- Responsive Design --- */
@media (max-width: 900px) {
    .featured-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .header-container { flex-direction: column; gap: 15px; }
    .hero-section h1 { font-size: 2.5rem; }
    .shop-hero-section .hero-title { font-size: 2.5rem; }
    .pillars-container { flex-direction: column; align-items: center; }
    .category-grid { grid-template-columns: 1fr; }
}

