/*
Theme Name: My WooCommerce Theme
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A custom responsive WordPress theme with native WooCommerce integration.
Version: 1.0.0
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: my-woocommerce-theme
*/

/* Reset & Layout */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f7f9fa;
    color: #2d3748;
    line-height: 1.6;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 18px 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
}

.site-title a {
    color: #1a202c;
    text-decoration: none;
    font-weight: 700;
}

.site-nav a {
    margin-left: 20px;
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
}

.site-nav a:hover {
    color: #2b6cb0;
}

.site-main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.site-footer {
    text-align: center;
    padding: 30px 20px;
    color: #718096;
    border-top: 1px solid #e2e8f0;
}

/* ==========================================================================
   WooCommerce Core Styling & Overrides
   ========================================================================== */

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

ul.products::before,
ul.products::after {
    display: none !important;
}

ul.products li.product {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 0 !important;
    float: none !important;
    width: auto !important;
}

ul.products li.product:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

ul.products li.product img {
    border-radius: 6px;
    width: 100%;
    height: auto;
    object-fit: cover;
    margin-bottom: 12px !important;
}

ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.05rem !important;
    color: #2d3748 !important;
    margin-bottom: 8px !important;
}

/* Pricing */
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price {
    color: #2b6cb0 !important;
    font-size: 1.15rem !important;
    font-weight: 700;
}

.woocommerce span.onsale {
    background-color: #e53e3e !important;
    color: #ffffff !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    line-height: 1 !important;
    min-height: auto !important;
    min-width: auto !important;
    font-size: 0.75rem !important;
    text-transform: uppercase;
}

/* Buttons */
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    background-color: #3182ce !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 10px 18px !important;
    font-weight: 600 !important;
    border: none !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-align: center;
}

.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background-color: #2b6cb0 !important;
}

/* Checkout & Cart Tables */
table.shop_table {
    border-collapse: collapse !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    width: 100% !important;
    margin-bottom: 30px !important;
}

table.shop_table th,
table.shop_table td {
    padding: 14px 16px !important;
    border-bottom: 1px solid #edf2f7 !important;
}

/* Cart Counter in Header */
.cart-header-link {
    background: #edf2f7;
    padding: 8px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    color: #2d3748;
}

.cart-header-link:hover {
    background: #e2e8f0;
}