/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

/* CSS Variables for consistent theming */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #f59e0b;
    --accent-color: #10b981;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --background-primary: #ffffff;
    --background-secondary: #f8fafc;
    --background-tertiary: #f1f5f9;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--background-secondary) 0%, var(--background-primary) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Improved typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Modern Navigation */
nav {
    background: var(--background-primary);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav-wrapper {
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.company-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    white-space: normal;
    line-height: 1.2;
}

.company-name:hover {
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.nav-wrapper ul {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    gap: 2rem;
}

.nav-wrapper ul li a {
    font-weight: 500;
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
}

.nav-wrapper ul li a:hover,
.nav-wrapper ul li a.active {
    color: var(--primary-color);
    background: var(--background-tertiary);
}

.nav-wrapper ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-wrapper ul li a:hover::after {
    width: 100%;
}

/* Modern Container and Sections */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 4rem 0;
    flex: 1;
}

/* Modern Button Styles */
.btn, .waves-effect {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: var(--shadow-md);
}

.btn:hover, .waves-effect:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

/* Hero Section Enhancements */
.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.15;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-outline {
    background: transparent !important;
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-2px);
}

/* Quick Links / Help section */
.quick-links {
    margin-top: 2rem;
}

.quick-links h3 {
    margin-bottom: 1.25rem;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.quick-actions .btn {
    margin: 0.25rem;
}

/* WhatsApp button */
.btn-whatsapp {
    background: #25D366 !important;
    border-color: #25D366 !important;
    color: white !important;
}

.btn-whatsapp:hover {
    background: #128C7E !important;
    border-color: #128C7E !important;
    color: white !important;
}

/* WhatsApp icon (inline SVG) */
.wa-icon {
    width: 1.25em;
    height: 1.25em;
    margin-right: 0.5rem;
    fill: currentColor;
    flex-shrink: 0;
    vertical-align: middle;
}

/* Contact section WhatsApp button: wrap on narrow screens */
.contact-section .btn-whatsapp {
    max-width: 100%;
    white-space: normal;
    line-height: 1.3;
    text-align: center;
    padding: 0.85rem 1.25rem;
}

/* Contact section on Company page */
.contact-section {
    margin-top: 2.5rem;
    padding: 2rem;
    background: var(--background-secondary, #f9fafb);
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.contact-section h3 {
    margin-bottom: 0.75rem;
}

.contact-section p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

@media (max-width: 480px) {
    .contact-section {
        padding: 1.25rem 1rem;
    }

    .contact-section .btn-whatsapp {
        width: 100%;
        padding: 0.8rem 0.75rem;
        font-size: 0.95rem;
    }

    .contact-section .wa-icon {
        width: 1.1em;
        height: 1.1em;
        margin-right: 0.35rem;
    }
}

/* Features Section */
.section-description {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    font-weight: 500;
    line-height: 1.7;
}

#features .container > .row:first-child {
    display: block !important;
    text-align: center;
    margin-bottom: 3rem;
}

#features .container > .row:first-child .col {
    display: block;
    width: 100%;
}

#features .container > .row:first-child h2 {
    text-align: center;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    font-size: 2.5rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem 2rem;
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
    box-shadow: var(--shadow-md);
}

#features .row:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

#features .row:last-child .col {
    flex: 1;
    min-width: 300px;
    max-width: 350px;
}

.feature-card {
    padding: 2rem 1rem;
    height: 100%;
    min-height: 280px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    backdrop-filter: blur(15px);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    background: rgba(255, 255, 255, 0.98);
}

.feature-icon {
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.feature-icon i {
    color: var(--primary-color);
    font-size: 3.5rem !important;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    flex-shrink: 0;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
    display: flex;
    align-items: center;
}

/* Hero Section Styles */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 6rem 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('images/bg2.jpg') center/cover;
    opacity: 0.1;
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero .card-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3rem;
    color: var(--text-primary);
}

/* Modern Product List Styles */
.collection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.collection-item {
    background: var(--background-primary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.collection-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.collection-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: var(--background-tertiary);
}

.collection-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.collection-image:hover {
    transform: scale(1.05);
}

.collection-item .content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.collection-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.collection-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    flex: 1;
}

/* Search Input Styles */
#search-input {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    font-size: 1rem;
    background: var(--background-primary);
    transition: var(--transition);
    margin-bottom: 2rem;
    box-sizing: border-box;
}

/* Override Materialize's .input-field .prefix ~ input rules that shift the search input right */
.search-container .input-field .prefix ~ input#search-input {
    margin-left: 0 !important;
    width: 100% !important;
}

.search-container .input-field .prefix {
    top: 50%;
    transform: translateY(-50%);
    left: 1rem;
    color: var(--text-light);
}

.search-container .input-field {
    position: relative;
}

.search-container .input-field label {
    left: 3.5rem;
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#search-input::placeholder {
    color: var(--text-light);
}

/* Product Detail Styles */
#product-detail {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.product-image {
    padding: 0;
    margin: 0;
}

.product-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    display: block;
}

.product-info {
    padding: 0;
    margin: 0;
}

.product-info h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.product-info p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Back to Products Button Alignment */
.back-to-products {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.back-to-products .btn {
    margin: 0;
}

/* Responsive for Product Detail */
@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Form Styles */
.input-field {
    margin-bottom: 1.5rem;
    position: relative;
}

.input-field input,
.input-field textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: var(--background-primary);
    transition: var(--transition);
}

.input-field input:focus,
.input-field textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-field label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--text-light);
    transition: var(--transition);
    pointer-events: none;
    background: var(--background-primary);
    padding: 0 0.25rem;
}

.input-field input:focus + label,
.input-field input:not(:placeholder-shown) + label,
.input-field textarea:focus + label,
.input-field textarea:not(:placeholder-shown) + label {
    transform: translateY(-1.5rem) scale(0.85);
    color: var(--primary-color);
}

/* Modern Footer */
.page-footer {
    background: linear-gradient(135deg, var(--text-primary) 0%, #374151 100%);
    color: white;
    padding: 2rem 0;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.page-footer p {
    color: #d1d5db;
    margin: 0;
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-wrapper {
        padding: 0 1rem;
        flex-direction: column;
        height: auto;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .nav-wrapper ul {
        margin-top: 1rem;
        gap: 1rem;
    }

    .company-name {
        font-size: 1.15rem;
        text-align: center;
        word-break: break-word;
    }

    .company-name .material-icons.left {
        margin-right: 0.35rem;
        font-size: 1.4rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero .card-panel {
        padding: 2rem;
        margin: 1rem;
    }

    /* Hero buttons: stack full-width, shrink padding, allow wrap */
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .hero-actions .btn,
    .hero-actions .btn-large {
        width: 100%;
        padding: 0.9rem 1rem;
        font-size: 1rem;
        white-space: normal;
        line-height: 1.25;
        justify-content: center;
        text-align: center;
    }

    .hero-actions .btn i.material-icons.left {
        margin-right: 0.4rem;
    }

    /* Search input: smaller on mobile */
    #search-input {
        padding: 0.75rem 1rem 0.75rem 3rem;
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
        border-radius: var(--border-radius);
    }

    .search-container .input-field .prefix {
        left: 0.75rem;
        font-size: 1.4rem;
    }

    .search-container .input-field label {
        left: 3rem;
    }

    .search-container .input-field {
        margin-bottom: 1rem;
    }

    /* Quick action buttons: stack, full width, clear spacing */
    .quick-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .quick-actions .btn {
        width: 100%;
        margin: 0;
        justify-content: center;
        padding: 0.85rem 1rem;
        white-space: normal;
    }

    .collection {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    #product-detail .row {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Features responsive */
    #features .row {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    #features .col {
        min-width: 100%;
        max-width: 100%;
    }
    
    .feature-card {
        min-height: 250px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .hero-title {
        font-size: 1.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .section {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero .card-panel {
        padding: 1.5rem;
    }
    
    .btn, .waves-effect {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }

    .hero-actions .btn,
    .hero-actions .btn-large {
        padding: 0.8rem 0.75rem;
        font-size: 0.95rem;
    }

    .feature-card {
        min-height: 220px;
        padding: 1.5rem 1rem;
    }
    
    .feature-icon i {
        font-size: 3rem !important;
    }
}

/* Loading Animation */
.spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid var(--background-tertiary);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    padding: 1rem;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Utility Classes */
.center-align {
    text-align: center;
    justify-content: center;
    align-items: center;
}

.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.p-2 { padding: 1rem; }

/* Card Panel Modern Style */
.card-panel {
    background: var(--background-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.card-panel:hover {
    box-shadow: var(--shadow-lg);
}

/* Modern Sidenav (for mobile) */
#sidenav {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: var(--background-primary);
    box-shadow: var(--shadow-xl);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    padding: 2rem 0;
}

#sidenav.open {
    left: 0;
}

#sidenav ul {
    list-style: none;
    padding: 0;
}

#sidenav ul li {
    padding: 0;
}

#sidenav ul li a {
    display: block;
    padding: 1rem 2rem;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

#sidenav ul li a:hover {
    background: var(--background-secondary);
    color: var(--primary-color);
}

#sidenav-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1002;
    color: var(--text-primary);
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

#sidenav-toggle:hover {
    background: var(--primary-color);
    color: white;
}
