/* Общи стилове за сайта на АХТАРИ ПРО */

/* Цветова палитка - светла (по подразбиране) и тъмна тема */
:root {
    --bg: #ddd3c0;
    --text: #2b2b2b;
    --muted: #555;
    --footer-text: #888;
    --header-bg: #2b2b2b;
    --header-text: #fff;
    --card-bg: #ece5d8;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --border: #cabfac;
    --row-border: #d8cfbd;
    --input-bg: #f4efe5;
    --input-border: #bbb09a;
    --accent: #e07a3f;
}

[data-theme="dark"] {
    --bg: #1a1a1a;
    --text: #e6e6e6;
    --muted: #b3b3b3;
    --footer-text: #999;
    --header-bg: #111111;
    --header-text: #f0f0f0;
    --card-bg: #262626;
    --card-shadow: rgba(0, 0, 0, 0.4);
    --border: #444444;
    --row-border: #3a3a3a;
    --input-bg: #333333;
    --input-border: #555555;
    --accent: #e8975c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    transition: background-color 0.2s, color 0.2s;
}

/* Заглавна част на всяка страница */
header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 0.6rem;
    transition: background-color 0.2s, color 0.2s;
}

header .logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-icon {
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* Метален текстов логотип */
.logo-name {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    line-height: 1;
}

/* Декоративни линии горе/долу */
.logo-name::before,
.logo-name::after {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(240, 170, 80, 0.3) 10%,
        #d4904a 30%,
        #f0c870 50%,
        #d4904a 70%,
        rgba(240, 170, 80, 0.3) 90%,
        transparent 100%
    );
}

.logo-name-text {
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, 'Times New Roman', serif;
    font-size: 1.52rem;
    font-weight: 900;
    letter-spacing: 0.28em;
    text-transform: uppercase;

    /* Метален градиент – имитира отражение на светлина върху полирана бронзова повърхност */
    background: linear-gradient(
        to bottom,
        #fff4d6 0%,
        #f4c068 10%,
        #e08830 28%,
        #b85520 45%,
        #c87030 58%,
        #e89848 72%,
        #ffd880 85%,
        #e89040 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.7));
}

.logo-dot {
    display: inline-block;
    margin: 0 0.15em;
    font-size: 0.7em;
    vertical-align: middle;
    opacity: 0.85;
}

nav {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-btn {
    color: var(--header-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.38rem 1.1rem;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.nav-btn:hover,
.nav-btn.active {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(224, 122, 63, 0.12);
}

/* Бутон за превключване на тема (светла/тъмна) */
.theme-toggle {
    margin-left: 1.5rem;
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--header-text);
    border-radius: 50%;
    color: var(--header-text);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Основно съдържание */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

/* Секция "герой" на началната страница */
.hero {
    text-align: center;
    padding: 3rem 1rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.1rem;
    color: var(--muted);
}

/* Голямо лого на началната страница (иконата + "АХТАРИ"/"ПРО" на 2 реда) */
.hero-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.hero-logo-icon {
    width: clamp(200px, 36vw, 360px);
    height: auto;
    filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.5));
}

.hero-logo-name {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.05em;
    line-height: 0.95;
}

/* Декоративни линии над и под логотипа */
.hero-logo-name::before,
.hero-logo-name::after {
    content: '';
    display: block;
    align-self: stretch;
    height: 2px;
    margin: 0.35rem 0;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(240, 170, 80, 0.3) 10%,
        #d4904a 30%,
        #f0c870 50%,
        #d4904a 70%,
        rgba(240, 170, 80, 0.3) 90%,
        transparent 100%
    );
}

/* По-голям вариант на металния логотип – на един ред */
.hero-logo-text {
    font-size: clamp(2rem, 6vw, 3.4rem);
    letter-spacing: 0.14em;
    white-space: nowrap;
}

.hero-tagline {
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 640px;
    margin: 0 auto;
}

/* Заглавна секция на вътрешните страници (Продукти, Галерия) */
.page-intro {
    text-align: center;
    margin-bottom: 2rem;
}

.page-intro h1 {
    font-size: 2.2rem;
    margin-bottom: 0.4rem;
}

.page-intro p {
    color: var(--muted);
}

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 3rem 1rem;
}

/* Карти за продукти */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.product-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px var(--card-shadow);
    transition: background-color 0.2s;
}

.product-card img {
    width: 100%;
    height: 320px;
    object-fit: contain;
    display: block;
}

.product-card .product-info {
    padding: 1rem;
}

.product-card h3 {
    margin-bottom: 0.5rem;
}

.product-card a {
    color: inherit;
    text-decoration: none;
}

.product-card h3 a:hover {
    color: var(--accent);
}

.product-card img {
    cursor: pointer;
}

.price {
    font-weight: bold;
    color: var(--accent);
}

/* Галерия със снимки */
.gallery-section {
    margin-bottom: 3rem;
}

.gallery-section h2 {
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

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

.gallery-grid img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 2px 6px var(--card-shadow);
    cursor: pointer;
}

/* Голям преглед на снимка (lightbox) */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.5rem;
}

.lightbox-close {
    top: 1rem;
    right: 1.5rem;
}

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

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

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    color: #e07a3f;
}

/* Разделителна линия и секция "Може би ще харесате и това" */
hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}

.related h2 {
    margin-bottom: 1rem;
}

/* Списък със спецификации */
.specs {
    margin-top: 1rem;
    padding-left: 1.2rem;
}

.specs li {
    margin-bottom: 0.3rem;
}

/* Линкове – ползват акцентния цвят вместо браузърното синьо */
a {
    color: var(--accent);
}

/* Контактна информация */
.contact-info {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 6px var(--card-shadow);
    transition: background-color 0.2s;
}

.contact-info dt {
    font-weight: bold;
    margin-top: 0.5rem;
}

/* Долен колонтитул */
footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--footer-text);
    font-size: 0.9rem;
}

/* ═══════════════════════════════
   RESPONSIVE – таблет (≤ 768px)
   ═══════════════════════════════ */
@media (max-width: 768px) {
    header {
        padding: 0.75rem 1.2rem;
        gap: 0.6rem;
    }

    .logo-name-text {
        font-size: 1.25rem;
        letter-spacing: 0.18em;
    }

    .nav-btn {
        font-size: 0.85rem;
        padding: 0.3rem 0.8rem;
    }

    .theme-toggle {
        margin-left: 0.5rem;
    }

    main {
        padding: 1.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

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

/* ═══════════════════════════════
   RESPONSIVE – мобилен (≤ 520px)
   ═══════════════════════════════ */
@media (max-width: 520px) {
    header {
        flex-direction: column;
        align-items: stretch;
        padding: 0.7rem 0.75rem;
        gap: 0.5rem;
    }

    /* Логото заема цялата ширина, елементите се изравняват по височина */
    header .logo {
        width: 100%;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0.7rem;
    }

    .logo-icon {
        width: 80px;
        height: auto;
        flex-shrink: 0;
    }

    /* Текстът расте и запълва оставащото място, на височината на логото */
    .logo-name {
        flex: 1;
        min-width: 0;
        align-items: center;
        justify-content: space-between;
    }

    .logo-name::before,
    .logo-name::after {
        width: 100%;
    }

    .logo-name-text {
        font-size: clamp(1rem, 5.5vw, 1.4rem);
        letter-spacing: 0.15em;
        text-align: center;
    }

    /* Навигацията заема цялата ширина – всеки бутон се разтяга */
    nav {
        width: 100%;
        justify-content: stretch;
        gap: 0.35rem;
        flex-wrap: nowrap;
    }

    .nav-btn {
        flex: 1;
        text-align: center;
        font-size: 0.8rem;
        padding: 0.35rem 0.3rem;
        border-radius: 8px;
    }

    .theme-toggle {
        margin-left: 0;
        flex-shrink: 0;
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }

    main {
        padding: 1rem;
    }

    .hero {
        padding: 2rem 0.5rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

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

    .products {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .product-card img {
        height: 240px;
    }

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

    .gallery-grid img {
        height: 140px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
        padding: 1rem 0.75rem;
    }

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

    .specs {
        padding-left: 1rem;
    }
}
