/* ============================================================
   PureTop.ge — Main Stylesheet
   Clean, modern design inspired by bona.com.ge
   ============================================================ */

/* ---------- Font ---------- */
@font-face {
    font-family: 'Mont';
    src: url('/assets/fonts/mont_semibold.woff2') format('woff2'),
         url('/assets/fonts/mont_semibold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

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

:root {
    --color-primary: #1e293b;
    --color-primary-dark: #0f172a;
    --color-accent: #ea580c;
    --color-accent-hover: #c2410c;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-bg: #ffffff;
    --color-bg-light: #f8fafc;
    --color-border: #e2e8f0;
    --color-white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 0.3s ease;
    --header-height: 72px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Mont', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #1c2333;
    border-bottom: none;
    height: var(--header-height);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 32px;
    width: auto;
}

.footer-logo-img {
    height: 28px;
    width: auto;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.main-nav > a {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    padding: 8px 0;
    position: relative;
    transition: color var(--transition);
}

.main-nav > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition);
}

.main-nav > a:hover {
    color: #ffffff;
}

.main-nav > a:hover::after {
    width: 100%;
}

/* Nav Dropdown */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-dropdown-toggle {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    padding: 8px 0;
    cursor: pointer;
    transition: color var(--transition);
    background: none;
    border: none;
    font-family: inherit;
}

.nav-dropdown-toggle:hover {
    color: #ffffff;
}

.nav-dropdown-toggle .chevron {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 6px;
    vertical-align: middle;
    margin-bottom: 2px;
    transition: transform var(--transition);
}

.nav-dropdown:hover .nav-dropdown-toggle .chevron {
    transform: rotate(-135deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    min-width: 240px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition), visibility var(--transition);
    z-index: 100;
}

/* Invisible bridge to keep hover active between toggle and dropdown */
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--color-text);
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}

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

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: #ffffff;
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Hero Banner ---------- */
.hero {
    position: relative;
    height: clamp(320px, 53vw, 640px);
    margin-top: var(--header-height);
    background: #1c2333;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url('/assets/images/hero-bg.jpg') center bottom / cover no-repeat;
}

.hero-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(28, 35, 51, 0.92) 0%,
        rgba(28, 35, 51, 0.75) 35%,
        rgba(28, 35, 51, 0.35) 65%,
        rgba(28, 35, 51, 0.15) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--color-white);
    max-width: 600px;
}

.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero-content p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 32px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: var(--color-bg-light);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

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

.btn-full {
    width: 100%;
}

/* ---------- Section Titles ---------- */
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    color: var(--color-text);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    margin: 12px auto 0;
    border-radius: 2px;
}

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

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.product-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    border: 1px solid var(--color-border);
}

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

.product-card-img {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--color-bg-light);
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform var(--transition);
}

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

.product-card-body {
    padding: 16px 20px;
}

.product-card-body h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.4;
}

.product-card-sub {
    font-size: 0.82rem;
    color: var(--color-text-light);
    margin-top: 4px;
}

.product-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 20px;
}

.no-products {
    text-align: center;
    color: var(--color-text-light);
    font-size: 1.1rem;
    padding: 40px 0;
}

/* ---------- About Section ---------- */
.about-section {
    padding: 80px 0;
    background: var(--color-bg-light);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.05rem;
    color: var(--color-text-light);
    margin-bottom: 16px;
    line-height: 1.8;
}

/* ---------- Product Detail ---------- */
.product-detail {
    padding: 40px 0 80px;
    margin-top: var(--header-height);
}

.back-link {
    display: inline-block;
    color: var(--color-accent);
    font-weight: 500;
    margin-bottom: 24px;
    transition: color var(--transition);
}

.back-link:hover {
    color: var(--color-accent-hover);
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

/* Gallery */
.gallery-main {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg-light);
    cursor: pointer;
}

.gallery-main-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.gallery-thumbs {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    background: none;
    padding: 0;
    transition: border-color var(--transition);
}

.gallery-thumb.active,
.gallery-thumb:hover {
    border-color: var(--color-accent);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info */
.product-info h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--color-text);
}

.product-description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-light);
}

.product-description p {
    margin-bottom: 12px;
}

/* Specs Table */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.specs-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.95rem;
}

.specs-table td:first-child {
    font-weight: 600;
    color: var(--color-text);
    width: 40%;
    background: var(--color-bg-light);
}

.specs-table td:last-child {
    color: var(--color-text-light);
}

/* ---------- Lightbox ---------- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: var(--radius);
    object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 16px;
    transition: opacity var(--transition);
    z-index: 10000;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.7;
}

.lightbox-close {
    top: 16px;
    right: 24px;
    font-size: 3rem;
}

.lightbox-prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

/* ---------- Footer ---------- */
.site-footer {
    background: #1c2333;
    color: #ccc;
    padding: 60px 0 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-brand .footer-logo-img {
    margin-bottom: 4px;
}

.footer-tagline {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #999;
}

.footer-links h4,
.footer-contact h4 {
    color: var(--color-white);
    font-size: 1rem;
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 8px;
    transition: color var(--transition);
}

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

.footer-contact p {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #aaa;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: #777;
}

/* ---------- Alerts ---------- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-error ul {
    list-style: none;
    padding: 0;
}

.alert-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }


    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    /* Mobile hamburger nav */
    .hamburger {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: #1c2333;
        flex-direction: column;
        gap: 0;
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all var(--transition);
    }

    .main-nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .main-nav > a,
    .nav-dropdown-toggle {
        padding: 16px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        font-size: 1rem;
        width: 100%;
        text-align: left;
    }

    .main-nav > a::after {
        display: none;
    }

    .nav-dropdown {
        display: block;
    }

    .nav-dropdown::before {
        display: none;
    }

    .nav-dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        box-shadow: none;
        border: none;
        border-radius: 0;
        margin: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-dropdown.open .nav-dropdown-menu {
        max-height: 400px;
    }

    .nav-dropdown-menu a {
        padding: 12px 20px 12px 40px;
        background: rgba(255, 255, 255, 0.05);
        font-size: 0.9rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        color: rgba(255, 255, 255, 0.75);
    }

    /* Hero */
    .hero {
        height: clamp(280px, 50vw, 400px);
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    /* Product grid */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* Product detail */
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .product-info h1 {
        font-size: 1.5rem;
    }

    /* Gallery thumbs */
    .gallery-thumb {
        width: 64px;
        height: 64px;
    }

    /* Footer */
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Section padding */
    .products-section,
    .about-section {
        padding: 48px 0;
    }

    .section-title {
        font-size: 1.4rem;
        margin-bottom: 32px;
    }
}

@media (max-width: 480px) {
    .hero {
        height: clamp(240px, 52vw, 320px);
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .product-card-body {
        padding: 12px 14px;
    }

    .product-card-body h3 {
        font-size: 0.9rem;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 1.8rem;
        padding: 10px;
    }

    .lightbox-close {
        font-size: 2rem;
    }
}
