/**
 * WireBrand Theme - Main Stylesheet
 * 
 * Table of Contents:
 * 1. CSS Variables & Reset
 * 2. Typography
 * 3. Layout & Grid
 * 4. Header & Navigation
 * 5. Hero Section
 * 6. Features Section
 * 7. Product Grid
 * 8. Testimonials
 * 9. Contact Section
 * 10. Footer
 * 11. Buttons & Forms
 * 12. Utilities
 * 13. Responsive Design
 * 
 * @package WireBrand
 * @since 1.0.0
 */

/* ============================================
   1. CSS Variables & Reset
   ============================================ */
:root {
    /* Colors */
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --text-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-round: 50%;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Z-index */
    --z-header: 1000;
    --z-modal: 2000;
    --z-tooltip: 3000;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: var(--line-height-base);
    color: var(--text-dark);
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-base);
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ============================================
   2. Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    line-height: 1.1;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.text-center {
    text-align: center;
}

.text-uppercase {
    text-transform: uppercase;
}

.text-primary {
    color: var(--secondary-color);
}

.text-muted {
    color: var(--text-light);
}

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

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

.section {
    padding: var(--spacing-xl) 0;
}

.section-padding {
    padding: 80px 0;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ============================================
   4. Header & Navigation
   ============================================ */
.site-header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    transition: all var(--transition-base);
}

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

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

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.site-title a {
    color: inherit;
}

.custom-logo-link {
    display: flex;
    align-items: center;
}

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

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    font-weight: 500;
    color: var(--text-dark);
    padding: 0.5rem 0;
    transition: color var(--transition-base);
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
    color: var(--secondary-color);
}

/* Dropdown Menu */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow);
    min-width: 200px;
    padding: 1rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    border-radius: var(--radius-md);
}

.nav-menu li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu li {
    display: block;
}

.nav-menu .sub-menu a {
    display: block;
    padding: 0.5rem 1.5rem;
}

.nav-menu .sub-menu a:hover {
    background: var(--bg-light);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    background: transparent;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hamburger .line {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: all var(--transition-base);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-toggle,
.cart-toggle {
    padding: 0.5rem;
    color: var(--text-dark);
    transition: color var(--transition-base);
}

.search-toggle:hover,
.cart-toggle:hover {
    color: var(--secondary-color);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-color);
    color: var(--text-white);
    font-size: 0.75rem;
    width: 20px;
    height: 20px;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   5. Hero Section
   ============================================ */
.hero-section {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-white);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-white);
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    animation: fadeInUp 0.8s ease 0.2s;
    animation-fill-mode: both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.8s ease 0.4s;
    animation-fill-mode: both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-image {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    max-width: 50%;
    opacity: 0.1;
}

/* ============================================
   6. Features Section
   ============================================ */
.features-section {
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--secondary-color), #667eea);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-white);
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-light);
    line-height: 1.7;
}

/* ============================================
   7. Product Grid
   ============================================ */
.products-section {
    padding: 80px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition-base);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-color);
    color: var(--text-white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.product-badge.featured {
    background: var(--secondary-color);
}

.product-badge.new {
    background: #27ae60;
}

.product-content {
    padding: 1.5rem;
}

.product-category {
    font-size: 0.875rem;
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.product-title a {
    color: var(--text-dark);
}

.product-title a:hover {
    color: var(--secondary-color);
}

.product-excerpt {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.price-current {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.price-regular {
    font-size: 1.125rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
}

/* ============================================
   8. Testimonials
   ============================================ */
.testimonials-section {
    background: var(--bg-light);
    padding: 80px 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    position: relative;
}

.testimonial-quote {
    font-size: 3rem;
    color: var(--secondary-color);
    opacity: 0.2;
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.testimonial-content {
    position: relative;
    z-index: 1;
    margin-bottom: 1.5rem;
    font-style: italic;
    color: var(--text-dark);
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-round);
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.author-role {
    font-size: 0.875rem;
    color: var(--text-light);
}

.testimonial-rating {
    color: #f39c12;
    font-size: 1.125rem;
}

/* ============================================
   9. Contact Section
   ============================================ */
.contact-section {
    padding: 80px 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: var(--text-white);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.contact-details p {
    margin: 0;
    color: var(--text-light);
}

.contact-form {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color var(--transition-base);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   10. Footer
   ============================================ */
.site-footer {
    background: var(--primary-color);
    color: rgba(255, 255, 255, 0.8);
    padding-top: 60px;
}

.footer-widgets {
    padding-bottom: 40px;
}

.footer-widgets-grid {
    display: grid;
    gap: 2rem;
}

.footer-widget {
    color: rgba(255, 255, 255, 0.8);
}

.footer-widget .widget-title {
    color: var(--text-white);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

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

.footer-widget ul li {
    margin-bottom: 0.75rem;
}

.footer-widget a {
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--transition-base);
}

.footer-widget a:hover {
    color: var(--text-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
}

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

.copyright-text {
    font-size: 0.875rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-round);
    color: var(--text-white);
    transition: all var(--transition-base);
}

.social-link:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* ============================================
   11. Buttons & Forms
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--text-white);
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background: var(--secondary-color);
    color: var(--text-white);
}

.btn-white {
    background: var(--text-white);
    color: var(--secondary-color);
}

.btn-white:hover {
    background: var(--bg-light);
}

.btn-lg {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ============================================
   12. Utilities
   ============================================ */
.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

.d-grid {
    display: grid !important;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 2rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.5rem !important; }
.p-2 { padding: 1rem !important; }
.p-3 { padding: 1.5rem !important; }
.p-4 { padding: 2rem !important; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-round); }

.shadow { box-shadow: var(--shadow); }
.shadow-hover:hover { box-shadow: var(--shadow-hover); }

/* ============================================
   13. Responsive Design
   ============================================ */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .footer-widgets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }
    
    /* Mobile Navigation */
    .menu-toggle {
        display: flex;
    }
    
    .main-navigation {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--bg-white);
        padding: 2rem;
        transition: left var(--transition-base);
        z-index: 9999;
        overflow-y: auto;
    }
    
    .main-navigation.active {
        left: 0;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }
    
    .nav-menu li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem 0;
    }
    
    .nav-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 1rem;
    }
    
    /* Mobile Overlay */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
        z-index: 9998;
    }
    
    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Responsive Grid */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 500px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-image {
        display: none;
    }
    
    /* Footer */
    .footer-widgets-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .section-padding {
        padding: 60px 0;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .site-header,
    .mobile-menu,
    .site-footer,
    .btn,
    .search-modal {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
}
