/* public/css/model3dStyle.css - Cleaned Version */

/* ==========================================================================
   1. Global & Variables
   ========================================================================== */
:root {
    --primary-color: #2d5016; /* Dark Green */
    --background-light: #9ad7f3; /* Light Blue */
    --text-dark: #333;
    --text-light: #fff;
    --text-muted: #666;
    --border-color: #ddd;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(45, 80, 22, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --border-radius-card: 15px;
    --border-radius-button: 25px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, var(--background-light) 0%, #b8e2f5 50%, var(--background-light) 100%);
    color: var(--text-dark);
    position: relative;
}

/* Background pattern overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 25% 25%, rgba(45, 80, 22, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(154, 215, 243, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ==========================================================================
   2. Layout: Header, Main, Footer
   ========================================================================== */

/* --- Enhanced Header --- */
header {
    display: flex;
    border-bottom: 1px solid rgba(45, 80, 22, 0.2);
    justify-content: flex-start;
    align-items: center;
    padding: 15px 30px;
    background: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, #3a6b1f 100%);
    color: var(--text-light);
    box-shadow: 0 4px 20px rgba(45, 80, 22, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1000;
}

header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--background-light), transparent, var(--background-light));
}

.left-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 2rem;
}

.left-section img {
    height: 35px;
    margin-right: 10px;
    flex-shrink: 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
}

.left-section img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.website-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-right: 20px;
    flex-shrink: 0;
    background: linear-gradient(45deg, #fff, var(--background-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo-and-name {
    display: flex;
    align-items: center;
}

/* Enhanced Navigation */
.main-navigation {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 10px;
    font-weight: 600;
    align-items: center;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    text-decoration: none;
    color: var(--text-light);
    padding: 12px 20px;
    border-radius: var(--border-radius-button);
    transition: var(--transition-smooth);
    white-space: nowrap;
    position: relative;
    background: rgba(228, 228, 228, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.main-navigation a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-navigation a:hover::before,
.main-navigation a.active::before {
    opacity: 1;
}

.main-navigation a:hover,
.main-navigation a.active {
    background: rgba(154, 215, 243, 0.3);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

main {
    flex: 1 1 0;
    min-width: 300px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-card);
    box-shadow: 0 8px 32px rgba(45, 80, 22, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    transition: var(--transition-smooth);
    order: -1;
}

main:hover {
    box-shadow: 0 12px 40px rgba(45, 80, 22, 0.15);
    transform: translateY(-2px);
}

/* --- Enhanced Footer --- */
footer {
    padding: 30px 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3a6b1f 100%);
    color: var(--text-light);
    text-align: center;
    border-top: 1px solid rgba(154, 215, 243, 0.3);
    box-shadow: 0 -4px 20px rgba(45, 80, 22, 0.2);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--background-light), transparent, var(--background-light));
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================================================
   3. Enhanced Components
   ========================================================================== */

/* --- Enhanced Product Grid & Cards --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
    border-top: 20px solid var(--primary-color);
    border-bottom: 20px solid var(--primary-color);
    margin-bottom: 20px;
}

.product-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-card);
    box-shadow: 0 8px 25px rgba(45, 80, 22, 0.1);
    overflow: hidden;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--background-light));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(45, 80, 22, 0.2);
    background: rgba(255, 255, 255, 1);
}

.product-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(45, 80, 22, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-image::after {
    opacity: 1;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-details {
    padding: 20px;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.product-format {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding: 4px 12px;
    background: rgba(154, 215, 243, 0.2);
    border-radius: 15px;
    display: inline-block;
}

/* ==========================================================================
   4. Enhanced Responsive Design
   ========================================================================== */

@media (max-width: 992px) {
    header {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding: 20px;
    }

    .left-section {
        flex-direction: column;
        align-items: center;
        width: 100%;
        justify-content: center;
        gap: 15px;
    }

    .logo-and-name {
        flex-direction: row;
        justify-content: center;
        width: 100%;
    }

    .main-navigation {
        width: 100%;
        justify-content: center;
    }
    
    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 10px;
        gap: 8px;
    }
    
    main {
        width: 100%;
        min-width: auto;
        order: 0;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 15px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 993px) {
    .left-section {
        flex-direction: row;
        flex-wrap: nowrap;
    }
    
    .main-navigation ul {
        flex-wrap: nowrap;
    }
}

@media (max-width: 768px) {
    header, footer {
        padding: 20px;
    }
    
    .left-section img {
        height: 40px;
    }
    
    .website-name {
        font-size: 1.3rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .left-section img {
        height: 35px;
    }
    
    .website-name {
        font-size: 1.1rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .main-navigation ul {
        gap: 5px;
    }
    
    .main-navigation a {
        padding: 10px 12px;
        font-size: 0.9em;
    }
}

/* Additional animations and micro-interactions */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card {
    animation: fadeIn 0.6s ease forwards;
}

/* Enhanced loading states */
.product-image img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}