/**
 * Maestro Pizzeria Theme Styles
 * Global UI enhancements and brand styling
 */

/* ============================================
   CSS Variables / Brand Colors
   ============================================ */
:root {
    --maestro-primary: #c41e3a;
    --maestro-primary-dark: #a01830;
    --maestro-primary-light: #ff3d5a;
    --maestro-secondary: #333333;
    --maestro-accent: #ffd700;
    --maestro-success: #28a745;
    --maestro-warning: #ffc107;
    --maestro-error: #dc3545;
    --maestro-text: #333333;
    --maestro-text-light: #666666;
    --maestro-bg: #ffffff;
    --maestro-bg-light: #f8f9fa;
    --maestro-border: #e0e0e0;
    --maestro-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --maestro-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --maestro-radius: 8px;
    --maestro-radius-lg: 12px;
    --maestro-transition: 0.3s ease;
}

/* ============================================
   Global Styles
   ============================================ */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--maestro-text);
    line-height: 1.6;
}

a {
    color: var(--maestro-primary);
    text-decoration: none;
    transition: color var(--maestro-transition);
}

a:hover {
    color: var(--maestro-primary-dark);
}

/* ============================================
   Header Enhancements
   ============================================ */
.site-header {
    background: var(--maestro-bg);
    box-shadow: var(--maestro-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-branding img {
    max-height: 60px;
}

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

.main-navigation a {
    display: block;
    padding: 12px 18px;
    color: var(--maestro-secondary);
    font-weight: 500;
    border-radius: var(--maestro-radius);
    transition: all var(--maestro-transition);
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    background: var(--maestro-primary);
    color: #fff;
}

/* ============================================
   Buttons
   ============================================ */
.button,
.btn,
button[type="submit"],
input[type="submit"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    display: inline-block;
    padding: 12px 24px;
    background: var(--maestro-primary);
    color: #fff !important;
    border: none;
    border-radius: var(--maestro-radius);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all var(--maestro-transition);
}

.button:hover,
.btn:hover,
button[type="submit"]:hover,
input[type="submit"]:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background: var(--maestro-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
}

.button.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
    background: var(--maestro-secondary);
}

.button.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
    background: #000;
}

/* ============================================
   Forms
   ============================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--maestro-border);
    border-radius: var(--maestro-radius);
    font-size: 16px;
    transition: border-color var(--maestro-transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--maestro-primary);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--maestro-text);
}

/* ============================================
   WooCommerce Product Cards
   ============================================ */
.woocommerce ul.products li.product {
    background: var(--maestro-bg);
    border-radius: var(--maestro-radius-lg);
    overflow: hidden;
    box-shadow: var(--maestro-shadow);
    transition: all var(--maestro-transition);
    padding: 0;
    margin-bottom: 30px;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: var(--maestro-shadow-lg);
}

.woocommerce ul.products li.product img {
    width: 100%;
    border-radius: 0;
    margin: 0;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    padding: 15px 15px 10px;
    font-size: 16px;
    color: var(--maestro-text);
}

.woocommerce ul.products li.product .price {
    padding: 0 15px;
    font-size: 18px;
    font-weight: bold;
    color: var(--maestro-primary);
}

.woocommerce ul.products li.product .button {
    margin: 15px;
    width: calc(100% - 30px);
    text-align: center;
}

/* ============================================
   Single Product Page
   ============================================ */
.woocommerce div.product div.images img {
    border-radius: var(--maestro-radius-lg);
}

.woocommerce div.product .product_title {
    font-size: 32px;
    color: var(--maestro-text);
    margin-bottom: 15px;
}

.woocommerce div.product p.price {
    font-size: 28px;
    color: var(--maestro-primary);
    font-weight: bold;
}

.woocommerce div.product .woocommerce-product-details__short-description {
    font-size: 16px;
    color: var(--maestro-text-light);
    line-height: 1.8;
}

/* Quantity Input */
.woocommerce .quantity {
    display: flex;
    align-items: center;
}

.woocommerce .quantity .qty {
    width: 80px;
    text-align: center;
    border-radius: var(--maestro-radius);
}

/* ============================================
   Cart Page
   ============================================ */
.woocommerce-cart table.cart {
    border-radius: var(--maestro-radius-lg);
    overflow: hidden;
    box-shadow: var(--maestro-shadow);
}

.woocommerce-cart table.cart th {
    background: var(--maestro-secondary);
    color: #fff;
    padding: 15px;
}

.woocommerce-cart table.cart td {
    padding: 20px 15px;
    vertical-align: middle;
}

.woocommerce-cart table.cart img {
    width: 80px;
    border-radius: var(--maestro-radius);
}

.woocommerce-cart .cart_totals {
    background: var(--maestro-bg-light);
    padding: 25px;
    border-radius: var(--maestro-radius-lg);
}

/* ============================================
   Checkout Page
   ============================================ */
.woocommerce-checkout .woocommerce-billing-fields,
.woocommerce-checkout .woocommerce-shipping-fields,
.woocommerce-checkout .woocommerce-additional-fields {
    background: var(--maestro-bg);
    padding: 25px;
    border-radius: var(--maestro-radius-lg);
    box-shadow: var(--maestro-shadow);
    margin-bottom: 30px;
}

.woocommerce-checkout h3 {
    font-size: 20px;
    color: var(--maestro-primary);
    border-bottom: 2px solid var(--maestro-primary);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.woocommerce-checkout #order_review {
    background: var(--maestro-bg-light);
    padding: 25px;
    border-radius: var(--maestro-radius-lg);
}

.woocommerce-checkout #order_review_heading {
    font-size: 24px;
    color: var(--maestro-text);
}

.woocommerce-checkout table.shop_table {
    border-radius: var(--maestro-radius);
    overflow: hidden;
}

.woocommerce-checkout table.shop_table th {
    background: var(--maestro-secondary);
    color: #fff;
}

/* Payment Methods */
.woocommerce-checkout #payment {
    background: var(--maestro-bg);
    border-radius: var(--maestro-radius-lg);
}

.woocommerce-checkout #payment ul.payment_methods {
    padding: 20px;
    margin: 0;
    list-style: none;
}

.woocommerce-checkout #payment .payment_method_title {
    font-weight: 600;
}

/* ============================================
   Notices & Messages
   ============================================ */
.woocommerce-message,
.woocommerce-info {
    border-left-color: var(--maestro-primary);
    background: #fef3f5;
}

.woocommerce-message::before,
.woocommerce-info::before {
    color: var(--maestro-primary);
}

.woocommerce-error {
    border-left-color: var(--maestro-error);
}

/* ============================================
   Mini Cart (Header)
   ============================================ */
.cart-icon-wrapper {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--maestro-primary);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   Hero Section (Homepage)
   ============================================ */
.maestro-hero {
    background: linear-gradient(135deg, var(--maestro-primary) 0%, var(--maestro-primary-dark) 100%);
    color: #fff;
    padding: 80px 20px;
    text-align: center;
}

.maestro-hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.maestro-hero p {
    font-size: 20px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px;
}

.maestro-hero .btn-cta {
    display: inline-block;
    padding: 18px 40px;
    background: #fff;
    color: var(--maestro-primary);
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    text-transform: uppercase;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.maestro-hero .btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--maestro-secondary);
    color: #fff;
    padding: 60px 20px 30px;
}

.site-footer a {
    color: #fff;
    opacity: 0.8;
}

.site-footer a:hover {
    opacity: 1;
    color: var(--maestro-primary-light);
}

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

.footer-widget h3 {
    color: var(--maestro-primary-light);
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
}

/* ============================================
   Store Hours Widget
   ============================================ */
.store-hours {
    background: var(--maestro-bg-light);
    padding: 20px;
    border-radius: var(--maestro-radius-lg);
    border-left: 4px solid var(--maestro-primary);
}

.store-hours h4 {
    margin: 0 0 15px;
    color: var(--maestro-primary);
}

.store-hours ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.store-hours li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--maestro-border);
}

.store-hours li:last-child {
    border-bottom: none;
}

.store-hours .day-name {
    font-weight: 600;
}

.store-hours .hours {
    color: var(--maestro-text-light);
}

/* ============================================
   Loading States
   ============================================ */
.maestro-loading {
    position: relative;
    pointer-events: none;
}

.maestro-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    :root {
        --maestro-radius: 6px;
        --maestro-radius-lg: 10px;
    }

    .maestro-hero {
        padding: 50px 15px;
    }

    .maestro-hero h1 {
        font-size: 32px;
    }

    .maestro-hero p {
        font-size: 16px;
    }

    .woocommerce div.product .product_title {
        font-size: 24px;
    }

    .woocommerce div.product p.price {
        font-size: 22px;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-primary { color: var(--maestro-primary); }
.text-secondary { color: var(--maestro-secondary); }
.text-muted { color: var(--maestro-text-light); }
.bg-primary { background-color: var(--maestro-primary); }
.bg-secondary { background-color: var(--maestro-secondary); }
.bg-light { background-color: var(--maestro-bg-light); }
.rounded { border-radius: var(--maestro-radius); }
.rounded-lg { border-radius: var(--maestro-radius-lg); }
.shadow { box-shadow: var(--maestro-shadow); }
.shadow-lg { box-shadow: var(--maestro-shadow-lg); }
