/*
Theme Name: Diar
Theme URI: http://www.diarsaglik.com.tr/
Author: Gupse Bilgi Teknolojileri
Author URI: https://www.gupse.com
Description: Custom WordPress theme for Diar Mobilya ve Saglik Hizmetleri.
Version: 1.0.0
Text Domain: diar
Domain Path: /languages
Tags: responsive, custom-background, custom-menu, featured-images
*/

:root {
    /* Colors */
    --primary-color: #67c4cd;
    --text-color: #333;
    --bg-color: #fff;
    --gray-light: #f4f4f4;
    --border-color: #e0e0e0;
    
    /* Typography */
    --font-heading: 'Asap Condensed', sans-serif;
    --font-body: 'Poppins', sans-serif;
    
    /* Spacing & Sizes */
    --container-width: 1200px;
    --border-radius: 0.25rem; /* 4px */
}

/* Reset or Normalize (Minimal) */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    font-size: 1rem; /* Base 16px */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    font-weight: 700;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    text-decoration: underline;
}

p {
    margin-bottom: 1.5rem;
}

* p:last-child {
    margin-bottom: 0;
}

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

figure {
    margin-bottom: 1rem;
}

ol, ul {
    margin-left: 1.3rem;
    margin-bottom: 1.5rem;
}

/* Button Base */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.btn:hover {
    opacity: 0.9;
    text-decoration: none;
    color: #fff;
}

/**
 * Layout & Container
 */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/**
 * Header
 */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 1.125rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.admin-bar .site-header {
    top: 32px;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-branding {
    flex-shrink: 0;
}

.site-branding img {
    border-radius: 1.25rem;
    max-height: 4.725rem;
    width: auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Search Form */
.search-form {
    position: relative;
    width: 300px;
}

.search-field {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 10rem;
    background-color: #f9f9f9;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.search-field::placeholder {
    color: #999;
}

.search-field:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(103, 196, 205, 0.15);
    outline: none;
}

.search-submit {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.search-submit:hover {
    color: var(--primary-color);
}

/* Navigation */
.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
}

.main-navigation a {
    font-family: var(--font-heading);
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: -0.0125rem;
}

.main-navigation a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.menu-toggle {
    display: none;
}

/* CTA Button */
.btn-cta {
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
}

/* Responsive Header */
@media (max-width: 992px) {
    /* Header Actions Mobile Layout */
    .header-actions {
        display: none; /* Hidden by default */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        padding: 2rem;
        flex-direction: column;
        gap: 1.5rem;
        border-top: 1px solid var(--border-color);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 9999;
    }

    .header-actions.toggled {
        display: flex;
    }

    /* Reset Styles inside mobile drawer */
    .header-search { 
        display: block; /* Make sure search is visible in drawer */
        width: 100%;
    }
    
    .header-search .search-form {
        width: 100%; /* Full width search */
    }

    .primary-menu-container {
        display: block !important; /* Always block inside the drawer since drawer handles toggle */
        position: static;
        box-shadow: none;
        padding: 0;
        background: transparent;
        border: none;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start; /* Left align items */
    }

    .header-cta {
        width: 100%;
    }
    .btn-cta {
        display: block;
        text-align: center;
        width: 100%;
    }

    /* Toggle Button */
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
    }
    
    .menu-icon-bar {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--text-color);
        margin: 4px 0;
    }
}

/**
 * Footer
 */
.site-footer {
    background-color: #f9f9f9;
    color: #666;
    margin-top: 0;
    font-size: 0.95rem;
}

.footer-main {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-col h4.widget-title {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h4.widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-info .footer-logo img {
    border-radius: 1.0125rem;
    max-height: 4.25rem;
    width: auto;
}

.footer-info .footer-desc {
    margin: 1rem 0;
    line-height: 1.6;
}

.footer-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu ul li {
    margin-bottom: 0.5rem;
}

.footer-menu ul li a {
    color: #666;
    transition: color 0.3s ease;
}

.footer-menu ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.newsletter-form input[type="email"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}

.footer-contact p {
    font-size: .825rem;
    margin-bottom: .825rem;
}

/* Footer Bottom */
.footer-bottom {
    background-color: #fff;
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    font-size: 0.725rem;
    font-family: var(--font-heading);
    font-weight: 100;
    letter-spacing: .25px;
}

.footer-bottom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom-links {
    display: inline-block;
    margin-left: 1rem;
}

.footer-bottom-links a {
    color: #888;
    margin: 0 0.5rem;
}

.footer-bottom-links a:hover {
    color: var(--primary-color);
}

.gupse-credit img {
    opacity: 0.7;
    transition: opacity 0.3s;
}

.gupse-credit img:hover {
    opacity: 1;
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-bottom-links {
        display: block;
        margin: 0.5rem 0 0 0;
    }
}

/**
 * Front Page: Slider
 */
.home-slider {
    position: relative;
    width: 100%;
    max-height: 760px;
    height: auto;
    background-color: #f4f4f4;
    overflow: hidden;
    aspect-ratio: 24 / 10;
}

/* Slider Wrapper */
.slider-wrapper {
    position: relative;
    height: 100%;
}

.slide-item {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
    z-index: 1;
}

.slide-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Fallback for no JS slider yet - just show first or stack */
.slider-wrapper {
    height: 100%;
}

.slide-container {
    position: absolute;
    z-index: 2;
    left: 10%;
    bottom: 2rem;
}

.slide-content {
    background: rgba(0, 0, 0, .6);
    padding: 1.5rem 2rem;
    max-width: 600px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.slide-title {
    color: var(--bg-color);
    font-size: 3rem;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.slide-subtitle {
    color: var(--bg-color);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.slider-nav {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    pointer-events: none; /* Allow clicking through sidebar area */
    z-index: 10;
}

.prev-slide,
.next-slide {
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: auto; /* Re-enable clicking */
    line-height: 1;
    padding-bottom: 4px; /* Optical center adjustment */
}

.prev-slide:hover,
.next-slide:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-slide {
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

/**
 * Front Page: Product Groups
 */


.product-group-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1rem;
}

.product-group-item {
    position: relative;
    display: block;
    height: 100%;
    overflow: hidden;
}

.pg-image {
    aspect-ratio: 6 / 9;
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius);
    height: 100%;
    transition: transform 0.5s ease;
    width: 100%;
}

.product-group-item:hover .pg-image {
    transform: scale(1.05); /* Zoom effect */
}

.pg-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 1rem;
    color: #fff;
    text-align: center;
}

.pg-title {
    background-color: #fff;
    border-radius: 5rem;
    color: #333;
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.5rem;
    margin: 0;
    padding: .5rem 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/**
 * Front Page: Concept Tabs
 */
.section-concept-products {
    padding: 5rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 0;
}

.section-title {
    font-size: 2.5rem;
    color: #333;
    margin: 0;
}

.concept-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    gap: 0.5rem;
}

.concept-tabs-nav li {
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    color: #555;
    padding: 0.5rem 1.25rem;
    position: relative;
    transition: all 0.3s ease;
    background-color: #f0f0f0;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    user-select: none;
}

.concept-tabs-nav li:hover {
    background-color: #e4e4e4;
    color: #333;
}

.concept-tabs-nav li.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.concept-tabs-nav li.active::after {
    display: none;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Concept Products Grid/Slider */
.concept-products-slider {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* Product Card */
.product-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
    background: #fff;
}

.product-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.pc-image-wrapper {
    height: auto;
    background-color: #f9f9f9;
    overflow: hidden;
}

.pc-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pc-content {
    padding: .5rem;
    text-align: center;
}

.pc-title {
    font-size: 1.1rem;
    margin-bottom: 0;
}

.pc-link {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/**
 * Front Page: Projects
 */
.section-projects {
    padding: 5rem 0;
    background-color: #f8f8f8;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.project-item {
    position: relative;
    height: 400px;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.project-item:hover img {
    transform: scale(1.1);
}

.project-info {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    background: #fff;
    padding: 1.5rem;
    min-width: 250px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.project-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    padding: 0.75rem 2rem;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

/**
 * Front Page: Corporate
 */
.section-corporate {
    background-color: #f6f6f6;
    padding: 5rem 0;
}

.section-corporate .btn {
    margin: 1rem 0;
}

.corporate-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.corp-image img {
    border-radius: var(--border-radius);
    box-shadow: 20px 20px 0 var(--gray-light);
}

/**
 * Front Page: Icons & Contact
 */
.section-icons {
    padding: 4rem 0;
    background-color: var(--primary-color);
    color: #fff;
}

.icons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.icon-box {
    padding: 1rem;
}

.icon-img {
    height: 80px;
    margin-bottom: 1.5rem;
}
.icon-img img {
    height: 100%;
    width: auto;
    filter: brightness(0) invert(1); /* Make icons white */
}

.icon-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

/* Contact Bar */
.section-contact-bar {
    background-color: #333;
    color: #fff;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

.contact-bar-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-socials a {
    color: #fff;
    margin-left: 1rem;
    font-size: 1.2rem;
}

/* Responsive Front Page */
@media (max-width: 992px) {
    .home-slider {
        aspect-ratio: 16 / 10;
    }

    .slide-title {
        font-size: 2rem;
    }

    .slide-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .slide-content {
        padding: 1rem 1.25rem;
        max-width: 400px;
    }

    .btn-slide {
        font-size: 0.9rem;
        padding: 0.625rem 1.25rem;
    }

    .prev-slide,
    .next-slide {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .slider-nav {
        padding: 0 1rem;
    }

    .product-group-grid,
    .concept-products-slider,
    .icons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .corporate-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-bar-flex {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .home-slider {
        aspect-ratio: 4 / 5;
    }

    .slide-container {
        left: 0;
        right: 0;
        bottom: 0;
        padding: 1rem;
    }

    .slide-content {
        max-width: 100%;
        padding: 0.75rem 1rem;
    }

    .slide-title {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }

    .slide-subtitle {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }

    .btn-slide {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }

    .prev-slide,
    .next-slide {
        width: 32px;
        height: 32px;
        font-size: 1.25rem;
        padding-bottom: 2px;
    }

    .slider-nav {
        padding: 0 0.5rem;
    }

    /* Front Page Section Spacing */
    .section-concept-products,
    .section-projects,
    .section-corporate {
        padding: 2rem 0;
    }

    .section-icons {
        padding: 1.5rem 0;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-header {
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
    }

    .projects-grid {
        margin-top: 1.5rem;
        gap: 1rem;
    }

    .corporate-grid {
        gap: 2rem;
    }

    .footer-main {
        padding: 2rem 0;
    }
}

/**
 * Product Archives
 */
.main-content-area {
    padding: 3rem 1rem;
}

.archive-header {
    margin-bottom: 3rem;
    text-align: center;
}

.archive-title {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.product-archive-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.pagination {
    margin-top: 3rem;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    margin: 0 2px;
    color: var(--text-color);
    border-radius: 4px;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    text-decoration: none;
}

/**
 * Single Product
 */
.single-product-container {
    display: grid;
    grid-template-columns: 4fr 3fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.main-image {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.gallery-thumbs {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    justify-content: flex-start;
}

.thumb-item {
    aspect-ratio: 4 / 3;
    width: 120px;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
    width: 25%;
}

.thumb-item.active,
.thumb-item:hover {
    opacity: 1;
    border-color: var(--primary-color);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-title {
    font-size: 2.5rem;
    color: var(--text-color);
    line-height: 1.15;
    margin-bottom: 1rem;
}

.product-meta {
    margin-bottom: 2rem;
    color: #666;
    font-size: 0.9rem;
}

.product-description {
    color: #444;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.related-products-section {
    border-top: 1px solid var(--border-color);
    padding-top: 3rem;
}

/* Responsive Products */
@media (max-width: 992px) {
    .product-archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .single-product-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    .product-archive-grid {
        grid-template-columns: 1fr;
    }
}

/**
 * Lightbox
 */
.diar-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    visibility: hidden;
}

.diar-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border: 2px solid #fff;
}

.lightbox-close {
    position: absolute;
    background: #990000;
    border-radius: 5rem;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.3s;
    width: 3rem;
    height: 3rem;
    line-height: 3rem;
    text-align: center;
    right: -1.5rem;
    top: -1.5rem;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

.main-image img {
    cursor: zoom-in; /* Indicate clickable */
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    font-size: 3rem;
    padding: 0 1rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    user-select: none;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
    color: var(--primary-color);
}

.lightbox-prev {
    left: -60px;
}

.lightbox-next {
    right: -60px;
}

@media (max-width: 768px) {
    .lightbox-prev {
        left: -10px;
        background: rgba(0,0,0,0.5);
    }
    .lightbox-next {
        right: -10px;
        background: rgba(0,0,0,0.5);
    }
}

/**
 * Product Categories Grid
 */
.product-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    display: block;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    color: var(--text-color);
    color: var(--primary-color);
    text-decoration: none;
    transform: translateY(-4px);
}

.category-image {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--gray-light);
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.05);
}

.category-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #4fb3bd 100%);
    color: #fff;
    font-size: 4rem;
    font-weight: bold;
    text-transform: uppercase;
}

.category-info {
    padding: 1.25rem;
    text-align: center;
}

.category-name {
    font-size: 1.25rem;
    color: var(--text-color);
    margin: 0;
    transition: color 0.3s;
}

.category-card:hover .category-name {
    color: var(--primary-color);
}

.category-count {
    color: #888;
    display: none;
    font-size: 0.875rem;
}

/* Hierarchical Category Layout */
.category-group {
    margin-bottom: 3rem;
}

.parent-category-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.parent-category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: .05rem;
    margin: 0;
    text-transform: uppercase;
}

.parent-category-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.parent-category-title a:hover {
    color: var(--primary-color);
}

.child-categories .product-categories-grid {
    margin-top: 0;
}

@media (max-width: 768px) {
    .category-card--parent {
        flex-direction: column;
        max-width: 100%;
    }
    
    .category-card--parent .category-image {
        flex: none;
        width: 100%;
    }
    
    .category-card--parent .category-info {
        text-align: center;
    }
    
    .child-categories {
        padding-left: 1rem;
    }
}

/**
 * 404 Error Page
 */
.error-404-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
}

.error-content {
    margin: auto;
    max-width: 600px;
    text-align: center;
}

.error-code {
    font-size: 8rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin: 0;
    text-shadow: 4px 4px 0 var(--border-color);
}

.error-title {
    font-size: 2rem;
    margin: 1rem 0;
    color: var(--text-color);
}

.error-message {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.error-search {
    margin-bottom: 2rem;
}

.error-search .search-form {
    max-width: 100%;
    margin: auto;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .error-code {
        font-size: 5rem;
    }
    
    .error-title {
        font-size: 1.5rem;
    }
    
    .error-actions {
        flex-direction: column;
    }
    
    .error-actions .btn {
        width: 100%;
    }
}

/**
 * Blog Grid
 */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.blog-card-image {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--gray-light);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card .entry-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.blog-card .entry-title {
    font-size: 1.25rem;
    margin: 0 0 1rem;
    line-height: 1.4;
}

.blog-card .entry-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card .entry-title a:hover {
    color: var(--primary-color);
}

.blog-card .entry-excerpt {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card .read-more {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.blog-card .read-more:hover {
    text-decoration: underline;
}

/* Page & Single Layouts */
.main-content-area {
    min-height: 40vh;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.layout-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

@media (max-width: 992px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }
}

/**
* Recommended Products
*/
.recommended-products {
    margin-top: 4rem;
    padding-top: 4rem;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.recommended-products .section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--text-color);
}

.error-404-page {
    flex-direction: column;
}


@media (min-width: 1024px) {
    .header-search {
        margin-right: 2.5rem;
    }
}


@media (max-width: 768px) {

    .section-concept-products .section-header {
        margin-bottom: 1.5rem;
    }

    .section-product-groups .pg-overlay {
        padding: .5rem;
    }

    .section-product-groups .pg-title {
        font-size: 1rem;
        line-height: 1.1rem;
        padding: .5rem .75rem;
    }

    .section-concept-products .section-header {
        margin-bottom: 1.5rem;
    }
    .concept-tabs-nav {
        flex-direction: column;
        gap: .75rem;
    }

    .concept-tabs-nav li {
        padding: .25rem;
    }

    .section-corporate .section-title {
        line-height: 2.5rem;
        margin-bottom: 1rem;
    }

}