/* საჯარო საიტის სტილები (ადრე index.html-ში <style> იყო, უცვლელად გადმოტანილი) */
:root {
    --bg-dark-primary: #12151c;
    --bg-dark-secondary: #1a1e27;
    --bg-dark-card: #1f2430;
    --bg-dark-elevated: #282f3f;
    --gold-primary: #f0c75e;
    --gold-light: #fbe69b;
    --gold-dark: #b88d2a;
    --gold-gradient: linear-gradient(135deg, #f0c75e 0%, #ca9e3b 100%);
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --border-color: rgba(240, 199, 94, 0.25);
    --border-hover: rgba(240, 199, 94, 0.6);
    --numis-accent: #f5b041;
    --numis-border: rgba(245, 176, 65, 0.35);
    --phil-accent: #f06a6a;
    --phil-border: rgba(240, 106, 106, 0.35);
    --font-heading-en: 'Josefin Sans', sans-serif;
    --font-heading-ka: 'Josefin Sans', 'Noto Serif Georgian', sans-serif;
    --font-sans: 'Josefin Sans', 'Roboto', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark-primary);
    color: var(--text-main);
    font-family: var(--font-sans);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, .font-serif {
    font-family: var(--font-heading-en);
    font-weight: 700;
    letter-spacing: 0.5px;
}

body.lang-ka h1, 
body.lang-ka h2, 
body.lang-ka h3, 
body.lang-ka h4, 
body.lang-ka h5, 
body.lang-ka h6, 
body.lang-ka .font-serif,
body.lang-ka .navbar-brand,
body.lang-ka .nav-link,
body.lang-ka .filter-pill,
body.lang-ka .btn-explore-section {
    font-family: var(--font-heading-ka);
    letter-spacing: 0.5px;
}

.text-gold { color: var(--gold-primary) !important; }
.text-gold-light { color: var(--gold-light) !important; }
.category-desc { white-space: pre-line; line-height: 1.55; opacity: .92; }
.text-gold-gradient {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.border-gold { border-color: var(--border-color) !important; }

.btn-gold {
    background: var(--gold-gradient);
    color: #0d1017;
    font-weight: 700;
    border: none;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 15px rgba(240, 199, 94, 0.25);
}

.modal-desc-card {
    transition: all 0.3s ease;
}
.modal-desc-card #modal-item-desc {
    transition: color 0.3s ease;
}
.modal-desc-card:hover {
    border-color: var(--border-hover) !important;
    box-shadow: 0 4px 20px rgba(240, 199, 94, 0.15);
}
.modal-desc-card:hover #modal-item-desc {
    color: #f8fafc !important;
}

/* ადმინის ტექსტური რედაქტორის შიგთავსი */
.rich-text p, .rich-text ul, .rich-text ol, .rich-text blockquote { margin-bottom: 0.6rem; }
.rich-text > :last-child { margin-bottom: 0; }
.rich-text h3, .rich-text h4 { font-size: 1rem; font-weight: 600; color: #f8fafc; margin: 0.8rem 0 0.4rem; }
.rich-text ul, .rich-text ol { padding-left: 1.3rem; }
.rich-text blockquote { padding-left: 0.8rem; border-left: 3px solid var(--gold-primary); font-style: italic; }
.rich-text a { color: var(--gold-primary); }
/* სრული სტატიები (ავტომატური იმპორტი): ფოტოები, წარწერები, ცხრილები, ქვესათაურები */
.rich-text h2 { font-size: 1.15rem; font-weight: 600; color: #f8fafc; margin: 1.1rem 0 0.5rem; }
.rich-text img { max-width: 100%; height: auto; display: block; margin: 0.4rem auto; border-radius: 6px; border: 1px solid rgba(240, 199, 94, 0.15); }
.rich-text figure { margin: 1rem 0; }
.rich-text figure a { display: block; }
.rich-text figcaption { font-size: 0.8rem; color: #94a3b8; text-align: center; margin-top: 0.35rem; font-style: italic; }
.rich-text table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 0.8rem 0 1rem; font-size: 0.8rem; }
.rich-text th, .rich-text td { border: 1px solid rgba(240, 199, 94, 0.18); padding: 0.35rem 0.55rem; text-align: left; vertical-align: top; }
.rich-text th { background: rgba(240, 199, 94, 0.08); color: #f8fafc; font-weight: 600; }
.rich-text tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }
.rich-text hr { border-color: rgba(240, 199, 94, 0.25); margin: 1.2rem 0; }
.rich-text pre { white-space: pre-wrap; font-size: 0.8rem; color: #cbd5e1; }
.rich-text .news-source { margin-top: 1.2rem; padding-top: 0.7rem; border-top: 1px solid rgba(240, 199, 94, 0.15); font-size: 0.8rem; }

.btn-outline-gold {
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    background: transparent;
    transition: all 0.3s ease;
}
.btn-outline-gold:hover, .btn-outline-gold.active {
    background: var(--gold-primary);
    color: #0d1017;
    border-color: var(--gold-primary);
    box-shadow: 0 0 15px rgba(240, 199, 94, 0.3);
    font-weight: 600;
}

.btn-explore-section {
    background: rgba(240, 199, 94, 0.12);
    border: 1px solid var(--gold-primary);
    color: var(--gold-light);
    font-weight: 600;
    font-size: 0.82rem;
    padding: 6px 16px;
    border-radius: 30px;
    letter-spacing: 0.4px;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(4px);
}
.btn-explore-section:hover {
    background: var(--gold-gradient);
    color: #0d1017;
    box-shadow: 0 4px 18px rgba(240, 199, 94, 0.4);
    transform: translateY(-2px);
}

.navbar-custom {
    background-color: rgba(14, 17, 23, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    padding: 0.8rem 0;
}
.navbar-brand {
    font-family: var(--font-heading-en);
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    white-space: normal;
    line-height: 1.25;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.brand-title-line1 {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.8px;
}
.brand-title-line2 {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    opacity: 0.9;
}
.brand-icon-emblem {
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transform: scale(1.08) rotate(4deg);
    filter: drop-shadow(0 4px 16px rgba(240, 199, 94, 0.6));
}
.brand-icon-emblem svg {
    width: 64px;
    height: 64px;
}
.nav-link {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #cbd5e1 !important;
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
    padding: 0.45rem 0.8rem !important;
    margin: 0 0.1rem;
    border-radius: 6px;
    position: relative;
    white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
    color: var(--gold-primary) !important;
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 15%;
    width: 70%;
    height: 2px;
    background: var(--gold-primary);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--gold-primary);
}

.nav-link-badge {
    background-color: var(--gold-primary);
    color: #0b0d13;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    position: absolute;
    top: 0px;
    right: -6px;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(240, 199, 94, 0.4);
    transform: translateY(-20%);
}

.card-custom {
    background-color: var(--bg-dark-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.card-custom:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(240, 199, 94, 0.15);
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
    background-color: #0b0d13;
}
.product-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}
.card-custom:hover .product-img-wrapper img {
    transform: scale(1.06);
}

.card-content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    padding: 1.15rem;
    background: linear-gradient(180deg, rgba(31,36,48,0.95) 0%, rgba(26,30,39,1) 100%);
}

.product-card-header {
    margin-bottom: 0.85rem;
}

.product-card-title {
    font-family: var(--font-heading-en);
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.35;
    margin-bottom: 0.4rem;
    letter-spacing: 0.3px;
    word-wrap: break-word;
    overflow: visible;
    white-space: normal;
    display: block;
    transition: color 0.25s ease;
}

.card-custom:hover .product-card-title {
    color: var(--gold-light);
}

.product-card-subtitle {
    display: flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gold-primary);
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(240, 199, 94, 0.15);
    margin-top: auto;
}

.product-stock-footer-badge {
    background-color: var(--bg-dark-secondary);
    border: none;
    color: var(--gold-primary);
    font-family: var(--font-heading-en);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 6px 16px;
    border-radius: 8px;
    white-space: nowrap;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.product-price-badge {
    background-color: var(--bg-dark-secondary);
    border: 1.5px solid var(--gold-primary);
    color: var(--gold-primary);
    font-family: var(--font-heading-en);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 6px 16px;
    border-radius: 8px;
    white-space: nowrap;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(240, 199, 94, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.card-custom:hover .product-price-badge {
    box-shadow: 0 0 15px rgba(240, 199, 94, 0.35);
    background-color: var(--bg-dark-card);
}

.card-news-custom {
    background-color: var(--bg-dark-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.card-news-custom:hover {
    transform: translateY(-4px);
    border-color: var(--gold-primary);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.news-card-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background-color: rgba(12, 14, 20, 0.92) !important;
    color: var(--gold-primary) !important;
    border: none !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    padding: 3px 8px !important;
    border-radius: 4px !important;
    text-transform: uppercase !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(4px);
    z-index: 2;
}

.btn-bookmark {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(18, 21, 28, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 2;
}
.btn-bookmark:hover, .btn-bookmark.saved {
    background: var(--gold-primary);
    color: #0d1017;
    border-color: var(--gold-primary);
}

.filter-pill {
    background-color: var(--bg-dark-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 30px;
    padding: 6px 16px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}
.filter-pill:hover, .filter-pill.active {
    background: var(--gold-gradient);
    color: #0d1017;
    font-weight: 700;
    border-color: var(--gold-primary);
    box-shadow: 0 2px 10px rgba(240, 199, 94, 0.3);
}

.section-numismatics-frame,
.section-philately-frame,
.section-news-frame {
    margin-bottom: 2.5rem;
    background: rgba(26, 30, 39, 0.4);
    border: none;
    padding: 1.25rem;
    border-radius: 16px;
}
.section-header-banner {
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: none;
}

.hero-section-compact {
    background: linear-gradient(180deg, rgba(18,21,28,0.7) 0%, rgba(18,21,28,0.98) 100%),
                url('https://images.unsplash.com/photo-1610375461246-83df859d849d?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
    padding: 2.5rem 0 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.modal-content-custom {
    background-color: var(--bg-dark-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.85);
}

.gallery-carousel-container {
    position: relative;
    width: 100%;
    height: 320px;
    background-color: #0b0d13;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(240, 199, 94, 0.25);
    box-shadow: inset 0 0 15px rgba(0,0,0,0.8);
}
.gallery-main-img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    object-position: center;
    cursor: zoom-in;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.gallery-main-img:hover { 
    transform: scale(1.03);
}

#productCarousel .carousel-control-prev,
#productCarousel .carousel-control-next {
    width: 40px !important;
    height: 40px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(18, 21, 28, 0.85) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(240, 199, 94, 0.4) !important;
    border-radius: 50% !important;
    opacity: 0.9;
    transition: all 0.25s ease;
    margin: 0 12px;
    padding: 0;
    box-shadow: none !important;
    outline: none !important;
    z-index: 5;
}
#productCarousel .carousel-control-prev:hover,
#productCarousel .carousel-control-next:hover {
    opacity: 1;
    background: var(--gold-gradient) !important;
    border-color: var(--gold-primary) !important;
    box-shadow: 0 0 12px rgba(240, 199, 94, 0.5) !important;
}

.thumb-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.25s ease;
    background-color: #0e1117;
    flex-shrink: 0;
}
.thumb-img.active, .thumb-img:hover {
    border-color: var(--gold-primary);
    opacity: 1;
    box-shadow: 0 0 12px rgba(240, 199, 94, 0.4);
    transform: translateY(-2px);
}

.fullscreen-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 10, 14, 0.96);
    backdrop-filter: blur(10px);
    z-index: 1090;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.fullscreen-lightbox.active { display: flex; }
.fullscreen-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.9), 0 0 20px rgba(240, 199, 94, 0.25);
}
.lightbox-close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.25s ease;
}
.lightbox-close-btn:hover {
    background: var(--gold-primary);
    color: #000;
    transform: scale(1.1);
}

.badge-category {
    background-color: rgba(240, 199, 94, 0.15);
    color: var(--gold-primary);
    border: 1px solid rgba(240, 199, 94, 0.3);
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
}

.pagination-custom {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pagination-custom .page-link {
    background: rgba(26, 30, 39, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-family: var(--font-heading-en);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}
.pagination-custom .page-link:hover {
    background-color: var(--bg-dark-elevated);
    color: var(--gold-primary);
    border-color: var(--gold-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 199, 94, 0.2);
}
.pagination-custom .page-item.active .page-link {
    background: var(--gold-gradient);
    border-color: var(--gold-primary);
    color: #0d1017;
    font-weight: 700;
    box-shadow: 0 0 15px rgba(240, 199, 94, 0.4);
    transform: translateY(-1px);
}
.pagination-custom .page-item.disabled .page-link {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(18, 21, 28, 0.5);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.form-control-dark {
    background-color: var(--bg-dark-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 8px;
}
.form-control-dark::placeholder {
    color: #cbd5e1 !important;
    opacity: 0.85;
}
.form-control-dark:focus {
    background-color: var(--bg-dark-elevated);
    border-color: var(--gold-primary);
    color: var(--text-main);
    box-shadow: 0 0 10px rgba(240, 199, 94, 0.25);
}

.lang-switch-btn {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    color: var(--gold-light);
    background: rgba(240, 199, 94, 0.1);
    cursor: pointer;
    transition: all 0.25s ease;
}
.lang-switch-btn:hover {
    background: var(--gold-primary);
    color: #0d1017;
}

footer {
    background-color: #0b0d13;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* თითო გვერდი ცალკე მისამართზეა (index.php); ანიმაცია იგივე დარჩა */
.page-view {
    display: block;
    animation: fadeIn 0.35s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ბარათები ბმულებია (SEO), იერი უცვლელია */
a.card-custom, a.card-news-custom, a.card-custom:hover, a.card-news-custom:hover {
    color: inherit;
    text-decoration: none;
}
.card-hidden { display: none !important; }

/* პროდუქტის და სიახლის ცალკე გვერდი: მოდალის ბარათის სტილით */
.detail-card {
    background-color: var(--bg-dark-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}
.detail-card .detail-header {
    border-bottom: 1px solid var(--border-color);
}
.detail-back {
    color: var(--gold-light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}
.detail-back:hover { color: var(--gold-primary); }
.news-detail-img {
    max-height: 420px;
    object-fit: cover;
}

/* ბმულის კოპირება / გაზიარება (templates/parts/share_bar.html) */
.share-bar {
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}
.share-label {
    color: var(--text-muted);
    font-size: 0.8rem;
}
.share-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--gold-light);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.25s ease;
}
.share-icon:hover, .share-icon:focus-visible {
    background: var(--gold-primary);
    border-color: var(--gold-primary);
    color: #0d1017;
}
