/*
Theme Name:   DDFS Shop
Theme URI:    https://example.com/ddfs-shop
Description:  A modern, high-performance WooCommerce theme designed for ecommerce excellence. Features responsive design, WooCommerce deep integration, and optimized for conversions.
Author:       DDFS Team
Author URI:   https://example.com
Version:      1.0.0
Requires at least: 6.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:  ddfs-shop
Tags:         e-commerce, woocommerce, shop, responsive, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   Table of Contents
   ========================================================================== */
/*
   1. CSS Reset & Normalization
   2. Base Typography
   3. Layout & Grid
   4. Header
   5. Navigation
   6. Content
   7. WooCommerce Overrides
   8. Footer
   9. Responsive Design
   10. Utilities
*/

/* ==========================================================================
   1. CSS Reset & Normalization
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    background-color: #fff;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

/* ==========================================================================
   2. Base Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.5rem;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #004499;
}

/* ==========================================================================
   3. Layout & Grid
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    max-width: 100%;
    padding: 0 20px;
}

.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-content {
    flex: 1;
    padding: 40px 0;
}

/* ==========================================================================
   4. Header
   ========================================================================== */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.site-branding {
    display: flex;
    align-items: center;
}

.site-logo img {
    max-height: 60px;
    width: auto;
}

.site-title {
    font-size: 1.75rem;
    margin: 0;
    font-weight: 700;
}

.site-title a {
    color: #1a1a1a;
}

.site-description {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

/* ==========================================================================
   5. Navigation
   ========================================================================== */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
}

.main-navigation a {
    color: #333;
    font-weight: 500;
    padding: 8px 12px;
    display: block;
    transition: color 0.3s ease;
}

.main-navigation a:hover {
    color: #0066cc;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
}

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

.header-cart a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-weight: 500;
}

.cart-count {
    background-color: #0066cc;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ==========================================================================
   6. Content
   ========================================================================== */
.content-area {
    max-width: 1200px;
    margin: 0 auto;
}

.site-main {
    padding: 40px 20px;
}

article {
    margin-bottom: 40px;
}

.entry-header {
    margin-bottom: 30px;
}

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

.entry-meta {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 20px;
}

.entry-content {
    line-height: 1.8;
}

/* ==========================================================================
   7. WooCommerce Overrides
   ========================================================================== */
.woocommerce-breadcrumb {
    margin-bottom: 30px;
    font-size: 0.875rem;
    color: #666;
}

/* Product Grid */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce ul.products li.product {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

.woocommerce ul.products li.product .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0066cc;
    padding: 0 15px 15px;
    display: block;
}

/* Add to Cart Button */
.woocommerce ul.products li.product .button {
    width: 100%;
    padding: 12px;
    background-color: #0066cc;
    color: #fff;
    border: none;
    border-radius: 0;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.woocommerce ul.products li.product .button:hover {
    background-color: #004499;
}

/* Single Product Page */
.woocommerce div.product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.woocommerce div.product .woocommerce-product-gallery {
    grid-column: 1;
}

.woocommerce div.product .summary {
    grid-column: 2;
}

.woocommerce div.product .product_title {
    font-size: 2rem;
    margin-bottom: 15px;
}

.woocommerce div.product p.price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 20px;
}

.woocommerce div.product .woocommerce-product-details__short-description {
    margin-bottom: 25px;
    line-height: 1.8;
}

.woocommerce div.product form.cart {
    margin-bottom: 25px;
}

.woocommerce div.product form.cart .button {
    background-color: #0066cc;
    color: #fff;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.woocommerce div.product form.cart .button:hover {
    background-color: #004499;
}

/* Cart Page */
.woocommerce table.cart {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.woocommerce table.cart th,
.woocommerce table.cart td {
    padding: 15px;
    border: 1px solid #e5e5e5;
}

.woocommerce table.cart th {
    background-color: #f8f8f8;
    font-weight: 600;
}

/* Checkout */
.woocommerce-checkout .woocommerce {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.woocommerce form.checkout {
    grid-column: 1;
}

.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review {
    grid-column: 2;
}

/* ==========================================================================
   8. Footer
   ========================================================================== */
.site-footer {
    background-color: #1a1a1a;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: auto;
}

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

.footer-widget h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

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

.footer-widget ul li {
    margin-bottom: 8px;
}

.footer-widget a {
    color: #ccc;
}

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

.site-info {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #999;
    font-size: 0.875rem;
}

/* ==========================================================================
   9. Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .main-navigation ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
    }
    
    .main-navigation.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        padding: 20px;
    }
    
    .woocommerce ul.products {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .woocommerce div.product {
        grid-template-columns: 1fr;
    }
    
    .woocommerce-checkout .woocommerce {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .woocommerce ul.products {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   10. Utilities
   ========================================================================== */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal;
}

.alignleft {
    float: left;
    margin-right: 20px;
}

.alignright {
    float: right;
    margin-left: 20px;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}
