/* ===== КНИЖКОВА МАГІЯ STYLE — knyzhkova-magia.com =====
   Palette:
   --navy-deep:  #0F2347  (footer, dark backgrounds)
   --navy:       #1B3A6B  (primary brand)
   --gold:       #C9971A  (accent, prices)
   --gold-btn:   #E8A900  (buttons, hover)
   --cream:      #FAF7F2  (page background)
   --text:       #1A1A2E  (primary text)
   --text-mid:   #4A5868  (secondary text)
   --border:     #E0D8CC  (warm borders)
   Footer:       bg #0F2347 / text #A8BDD0 / link #7FA2BC / hover #E8A900 / title #fff
   ===================================================== */

/* --------------------------------------------------------
   GLOBAL — warm cream page background, readable base text
   -------------------------------------------------------- */
body {
    background-color: #FAF7F2 !important;
    color: #1A1A2E !important;
}
.container-fluid,
main,
#content,
.row {
    background-color: transparent;
}
/* Card surfaces stay white */
.product-thumb,
.module-section,
.box-banner-container,
.panel,
.well {
    background-color: #ffffff;
}

/* Global links — readable on any background */
a { color: #1B3A6B; }
a:hover { color: #C9971A; text-decoration: none; }

/* --------------------------------------------------------
   TOP ANNOUNCEMENT BAR
   -------------------------------------------------------- */
#top {
    background-color: #0F2347 !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    height: auto !important;
}
#top .container { background-color: #0F2347 !important; }
#top .btn-link,
#top .box-nav-links .btn-link { color: #B0C4D8 !important; font-size: 12px; }
#top .box-nav-links .btn-link:hover { color: #E8A900 !important; }
#top .box-language .btn-language-top,
#top .box-currency .currency-select {
    color: #B0C4D8 !important;
    background: transparent !important;
    border-color: rgba(176,196,216,0.3) !important;
}
#top .header-doptext, #top .box-doptext {
    color: #B0C4D8 !important;
    font-size: 13px;
    font-weight: 500;
}

/* --------------------------------------------------------
   HIDE ICON NAVIGATION BAR
   -------------------------------------------------------- */
nav#additional-menu,
.box-dopmenu,
.container.box-dopmenu,
#additional-menu { display: none !important; }

/* --------------------------------------------------------
   HEADER
   -------------------------------------------------------- */
header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(15,35,71,0.1);
    border-bottom: 2px solid #E0D8CC;
}
#logo img { max-height: 54px; width: auto; }

/* --------------------------------------------------------
   CATALOG BURGER BUTTON
   -------------------------------------------------------- */
.btn-menu-top {
    background-color: #1B3A6B !important;
    color: #ffffff !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
    transition: background 0.2s;
}
.btn-menu-top:hover {
    background-color: #E8A900 !important;
    color: #0F2347 !important;
}
.btn-menu-top svg { fill: #ffffff; stroke: #ffffff; }
.btn-menu-top:hover svg { fill: #0F2347; stroke: #0F2347; }

/* --------------------------------------------------------
   VERTICAL CATALOG MENU
   -------------------------------------------------------- */
.catalog-menu-list .list-unstyled > li > a,
.menu-v-list > li > a,
.menu_v_box .list-unstyled > li > a {
    color: #1B3A6B !important;
    font-weight: 500;
    padding: 7px 12px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}
.catalog-menu-list .list-unstyled > li > a:hover,
.menu-v-list > li > a:hover,
.menu_v_box .list-unstyled > li > a:hover {
    background: #EEF2F8 !important;
    color: #C9971A !important;
    text-decoration: none;
}
.catalog-menu-list .list-unstyled > li.active > a,
.menu-v-list > li.active > a {
    background: #1B3A6B !important;
    color: #ffffff !important;
}

/* --------------------------------------------------------
   SEARCH
   -------------------------------------------------------- */
#search .btn, .btn-search {
    background: #1B3A6B !important;
    color: #fff !important;
    border-color: #1B3A6B !important;
    border-radius: 0 4px 4px 0;
}
#search .btn:hover {
    background: #E8A900 !important;
    border-color: #E8A900 !important;
}
#search .form-control {
    border-color: #D5CBB8;
    border-radius: 4px 0 0 4px;
    background: #FDFBF8;
}
#search .form-control:focus {
    border-color: #1B3A6B;
    box-shadow: 0 0 0 2px rgba(27,58,107,0.1);
}

/* --------------------------------------------------------
   PRODUCT CARDS
   -------------------------------------------------------- */
.product-thumb {
    border: 1px solid #E8E0D4 !important;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff !important;
    transition: box-shadow 0.25s, transform 0.25s;
}
.product-thumb:hover {
    box-shadow: 0 8px 24px rgba(15,35,71,0.14) !important;
    transform: translateY(-3px);
}
/* Book cover portrait ratio */
.product-thumb .image a {
    display: block;
    background: #F2EDE4;
    position: relative;
}
.product-thumb .image img {
    aspect-ratio: 2/3;
    object-fit: cover;
    width: 100%;
    transition: transform 0.3s ease;
}
.product-thumb:hover .image img { transform: scale(1.04); }
/* Book spine shadow */
.product-thumb .image::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 8px;
    background: linear-gradient(to right, rgba(0,0,0,0.18), transparent);
    pointer-events: none;
}
/* Title */
.product-thumb .name a {
    font-family: Georgia, serif !important;
    font-size: 14px !important;
    color: #1B3A6B !important;
    font-weight: 600;
    line-height: 1.3;
}
.product-thumb .name a:hover { color: #C9971A !important; }
/* Author / description */
.product-thumb .description,
.product-thumb .caption .text-muted {
    color: #6A7A8A !important;
    font-size: 12px;
    font-style: italic;
}
/* Price */
.product-thumb .price { border-top: 1px solid #EDE8E0; padding-top: 8px; margin-top: 4px; }
.price-new, .product-thumb .price-new {
    color: #0F2347 !important;
    font-weight: 700;
    font-size: 16px;
}
.price-old {
    color: #9A8B7A !important;
    text-decoration: line-through;
    font-size: 12px;
}
/* Tax/special price */
.price-tax { color: #888 !important; font-size: 11px; }

/* --------------------------------------------------------
   ADD TO CART BUTTON
   -------------------------------------------------------- */
.btn-general.btn-add-to-cart,
.product-thumb .btn-general {
    border: 2px solid #1B3A6B !important;
    color: #1B3A6B !important;
    background: #ffffff !important;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}
.btn-general.btn-add-to-cart:hover {
    background: #1B3A6B !important;
    color: #ffffff !important;
}

/* --------------------------------------------------------
   SECTION HEADINGS
   -------------------------------------------------------- */
.module-heading h3,
.module-heading .module-title {
    color: #1B3A6B;
    font-weight: 700;
    font-size: 22px;
    border-bottom: 3px solid #C9971A;
    padding-bottom: 8px;
    display: inline-block;
}

/* --------------------------------------------------------
   BANNER ICON BLOCKS (4 features)
   -------------------------------------------------------- */
.banner-item {
    border-radius: 8px;
    padding: 12px !important;
    background: #ffffff;
    transition: box-shadow 0.2s;
}
.banner-item:hover { box-shadow: 0 4px 16px rgba(15,35,71,0.1); }
.banner-title { color: #1B3A6B !important; font-weight: 700; font-size: 15px; }
.banner-desc  { color: #5A6B7A !important; font-size: 13px; }
.banner-image img, .banner-image svg {
    filter: invert(16%) sepia(60%) saturate(900%) hue-rotate(196deg);
}

/* --------------------------------------------------------
   CATEGORY TABS
   -------------------------------------------------------- */
.tabs-container .nav-tabs,
.product-categorytabs .nav-tabs {
    border-bottom: 2px solid #1B3A6B !important;
    background: transparent;
}
.tabs-container .nav-tabs > li > a,
.product-categorytabs .nav-tabs > li > a,
.chm-tabs .nav-tabs > li > a {
    color: #1B3A6B !important;
    font-weight: 600;
    border: none !important;
    border-radius: 4px 4px 0 0 !important;
    padding: 10px 20px;
    transition: background 0.15s, color 0.15s;
    background: transparent !important;
}
.tabs-container .nav-tabs > li > a:hover,
.product-categorytabs .nav-tabs > li > a:hover,
.chm-tabs .nav-tabs > li > a:hover {
    background: #EEF2F8 !important;
    color: #1B3A6B !important;
}
.tabs-container .nav-tabs > li.active > a,
.product-categorytabs .nav-tabs > li.active > a,
.chm-tabs .nav-tabs > li.active > a {
    background: #1B3A6B !important;
    color: #ffffff !important;
    border: none !important;
}

/* Global nav tabs */
.nav-tabs > li > a { color: #1B3A6B !important; border-radius: 4px 4px 0 0 !important; font-weight: 500; }
.nav-tabs > li.active > a,
.nav-tabs > li > a:hover { background: #1B3A6B !important; color: #ffffff !important; border-color: #1B3A6B !important; }

/* --------------------------------------------------------
   WALL OF CATEGORIES
   -------------------------------------------------------- */
.wall-category-box .wc-item {
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    position: relative;
}
.wall-category-box .wc-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(15,35,71,0.2) !important;
}
.wall-category-box .wc-name,
.wall-category-box .wc-category-name {
    background: linear-gradient(transparent, rgba(15,35,71,0.9)) !important;
    color: #ffffff !important;
    font-family: Georgia, serif;
    font-weight: 700;
    font-size: 15px;
    padding: 10px 12px !important;
}
.chameleon-wallcategory .module-heading h3,
.chameleon-wallcategory .module-title {
    color: #1B3A6B;
    font-weight: 700;
    font-size: 22px;
    border-bottom: 3px solid #C9971A;
    padding-bottom: 8px;
    display: inline-block;
}

/* --------------------------------------------------------
   REVIEWS
   -------------------------------------------------------- */
.reviews-store-box, .module-reviews-store {
    background: #F2EDE4;
    border-radius: 10px;
    padding: 30px 0;
}
.rs-item, .review-store-box .item-rs {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #E8E0D4;
    padding: 20px !important;
    transition: box-shadow 0.2s;
}
.rs-item:hover, .review-store-box .item-rs:hover {
    box-shadow: 0 4px 16px rgba(15,35,71,0.10);
}
.rating .fa-star, .reviews-store-box .star, .rs-rating .active { color: #E8A900 !important; }
.rating .fa-star-o, .rs-rating .inactive { color: #ddd !important; }
.rs-author, .review-author { color: #1B3A6B !important; font-weight: 700; font-size: 14px; }
.rs-text, .review-text { color: #4A5868; font-size: 14px; line-height: 1.6; font-style: italic; }
.reviews-store-box .module-heading h3,
.chameleon-reviews-store .module-title {
    color: #1B3A6B;
    font-weight: 700;
    border-bottom: 3px solid #C9971A;
    padding-bottom: 8px;
    display: inline-block;
}
.theme-rating-bar .progress-bar, .rs-theme-bar { background-color: #1B3A6B !important; }
.rs-avg-rating { color: #1B3A6B !important; font-weight: 700; }

/* --------------------------------------------------------
   PRIMARY BUTTONS
   -------------------------------------------------------- */
.btn-primary, .btn-general.btn-primary {
    background-color: #E8A900 !important;
    border-color: #E8A900 !important;
    color: #0F2347 !important;
    font-weight: 700;
    border-radius: 4px;
    transition: all 0.2s;
}
.btn-primary:hover {
    background-color: #C9971A !important;
    border-color: #C9971A !important;
    box-shadow: 0 3px 10px rgba(201,151,26,0.4);
}

/* --------------------------------------------------------
   NEWSLETTER BUTTON
   -------------------------------------------------------- */
.btn-newsletter, .btn-subscribe {
    background: #E8A900 !important;
    color: #0F2347 !important;
    font-weight: 700;
    border: none !important;
    border-radius: 4px;
    transition: background 0.2s;
}
.btn-newsletter:hover { background: #C9971A !important; }

/* --------------------------------------------------------
   CART IN HEADER
   -------------------------------------------------------- */
.box-cart-top .btn-cart, #cart .btn-cart {
    background: #1B3A6B !important;
    color: #fff !important;
    border: 2px solid #1B3A6B !important;
    border-radius: 6px;
    transition: all 0.2s;
}
.box-cart-top .btn-cart:hover, #cart .btn-cart:hover {
    background: #E8A900 !important;
    color: #0F2347 !important;
    border-color: #E8A900 !important;
}

/* --------------------------------------------------------
   PAGINATION
   -------------------------------------------------------- */
.pagination > li > a, .pagination > li > span {
    color: #1B3A6B !important;
    border-color: #D5CBB8 !important;
    background: #ffffff;
}
.pagination > li.active > a, .pagination > li.active > span {
    background: #1B3A6B !important;
    border-color: #1B3A6B !important;
    color: #fff !important;
}
.pagination > li > a:hover { background: #EEF2F8 !important; color: #1B3A6B !important; }

/* --------------------------------------------------------
   ALERTS
   -------------------------------------------------------- */
.alert-success { border-left: 4px solid #1B3A6B; background: #EEF5E8; }
.alert-info    { border-left: 4px solid #4A90D9; }
.alert-warning { border-left: 4px solid #E8A900; }

/* --------------------------------------------------------
   SIDEBAR
   -------------------------------------------------------- */
.box-sidebar .box-heading {
    background: #1B3A6B !important;
    color: #ffffff !important;
    border-radius: 4px 4px 0 0;
    padding: 10px 14px;
    font-weight: 700;
}
.box-sidebar .list-group-item.active,
.box-sidebar .list-group-item.active:hover {
    background: #1B3A6B !important;
    border-color: #1B3A6B !important;
    color: #ffffff !important;
}
.box-sidebar .list-group-item:hover { color: #1B3A6B !important; background: #EEF2F8 !important; }

/* --------------------------------------------------------
   PRICE FILTER
   -------------------------------------------------------- */
.price-slider .ui-slider-range { background: #1B3A6B !important; }
.price-slider .ui-slider-handle { border-color: #1B3A6B !important; }

/* --------------------------------------------------------
   STICKERS / BADGES
   -------------------------------------------------------- */
.sticker-special    { background: #B02030 !important; }
.sticker-new        { background: #1B3A6B !important; }
.sticker-bestseller { background: #E8A900 !important; color: #0F2347 !important; }
.sticker-popular    { background: #4A7FC0 !important; }

/* --------------------------------------------------------
   BREADCRUMB
   -------------------------------------------------------- */
ol.breadcrumb {
    background: transparent !important;
    border-bottom: 1px solid #E8E0D4;
    padding: 8px 0;
}
.breadcrumb > li a { color: #1B3A6B !important; }
.breadcrumb > li + li::before { color: #9A8B7A; }
.breadcrumb > li.active { color: #4A5868; }

/* --------------------------------------------------------
   CATEGORY PAGE
   -------------------------------------------------------- */
#product-list .product-layout .product-thumb .image,
#product-grid .product-layout .product-thumb .image { background: #F2EDE4; }
#content h1 {
    color: #1B3A6B;
    font-family: Georgia, serif;
    border-bottom: 3px solid #C9971A;
    padding-bottom: 8px;
    display: inline-block;
}

/* --------------------------------------------------------
   PRODUCT DETAIL PAGE
   -------------------------------------------------------- */
.product-info h1 {
    font-family: Georgia, serif;
    color: #1B3A6B;
    font-size: 26px;
    line-height: 1.3;
}
.product-info .model, .product-info .sku,
.product-info .manufacturer-name a { color: #6A7A8A; font-size: 13px; font-style: italic; }
.product-info .manufacturer-name a:hover { color: #1B3A6B; }
#button-cart {
    background: #E8A900 !important;
    color: #0F2347 !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    padding: 12px 32px !important;
    border-radius: 4px !important;
    border: none !important;
    transition: all 0.2s;
}
#button-cart:hover {
    background: #C9971A !important;
    box-shadow: 0 4px 14px rgba(201,151,26,0.4);
}
#button-wishlist, #button-compare {
    color: #1B3A6B !important;
    border-color: #D5CBB8 !important;
}
#button-wishlist:hover, #button-compare:hover {
    background: #1B3A6B !important;
    color: #fff !important;
}
.product-info #tab-description { font-size: 15px; line-height: 1.8; color: #3A3A4A; }

/* --------------------------------------------------------
   CART PAGE
   -------------------------------------------------------- */
.table.shopping-cart-table thead th { background: #1B3A6B; color: #fff; }
.btn.btn-danger { background: transparent !important; color: #B02030 !important; border-color: #B02030 !important; }
.btn.btn-danger:hover { background: #B02030 !important; color: #fff !important; }

/* --------------------------------------------------------
   SHOW MORE BUTTON
   -------------------------------------------------------- */
.btn-showmore, .btn-show-more {
    border: 2px solid #1B3A6B !important;
    color: #1B3A6B !important;
    background: transparent !important;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-showmore:hover, .btn-show-more:hover {
    background: #1B3A6B !important;
    color: #fff !important;
}

/* --------------------------------------------------------
   MODULE SPACING
   -------------------------------------------------------- */
.module-section { padding: 40px 0; }
.module-section + .module-section { border-top: 1px solid #EDE8E0; }

/* ============================================================
   FOOTER — DARK NAVY THEME (override ALL Chameleon classes)
   ============================================================ */

/* Force dark background on footer and all its sections */
footer,
footer#footer,
footer .footer-top,
footer .footer-center,
footer .footer-bottom,
footer.ch-dark-theme,
footer.ch-light-theme,
footer.ch-dark-theme .footer-top,
footer.ch-dark-theme .footer-center,
footer.ch-dark-theme .footer-bottom,
footer.ch-light-theme .footer-top,
footer.ch-light-theme .footer-center,
footer.ch-light-theme .footer-bottom {
    background-color: #0F2347 !important;
    color: #A8BDD0 !important;
}

/* Footer column titles */
footer .title-f,
footer .title-f-contact,
footer.ch-dark-theme .title-f,
footer.ch-dark-theme .title-f-contact,
footer.ch-light-theme .title-f,
footer.ch-light-theme .title-f-contact {
    color: #FFFFFF !important;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding-bottom: 10px;
    border-bottom: 2px solid #C9971A !important;
    margin-bottom: 14px;
}

/* Footer links */
footer a,
footer#footer a,
footer.ch-dark-theme a,
footer.ch-light-theme a {
    color: #7FA2BC !important;
    transition: color 0.2s;
}

/* Footer link hover */
footer a:hover,
footer#footer a:hover,
footer.ch-dark-theme a:hover,
footer.ch-light-theme a:hover {
    color: #E8A900 !important;
    text-decoration: none !important;
}

/* Footer standard text */
footer p,
footer .description_store_footer {
    color: #7B94AA !important;
    font-size: 13px;
    line-height: 1.6;
}

/* Footer h5 headings */
footer h5, footer .h5 {
    color: #FFFFFF !important;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
}
footer h5::after {
    content: '';
    display: block;
    width: 32px;
    height: 2px;
    background: #C9971A;
    margin-top: 6px;
}

/* Footer bottom bar (copyright + payments) */
.footer-bottom,
footer .footer-bottom,
footer.ch-dark-theme .footer-bottom,
footer.ch-light-theme .footer-bottom {
    background-color: #07152B !important;
    border-top: 1px solid rgba(167,183,200,0.15) !important;
    color: #6A859A !important;
}
.footer-bottom a,
footer .footer-bottom a { color: #6A859A !important; }
.footer-bottom a:hover,
footer .footer-bottom a:hover { color: #E8A900 !important; }

/* Footer newsletter section */
footer .newsletter,
footer .box-newsletter {
    background-color: #162C50 !important;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}
footer .title-nl,
footer.ch-dark-theme .title-nl,
footer.ch-light-theme .title-nl {
    color: #FFFFFF !important;
    font-weight: 700;
}
footer .newsletter .form-control,
footer.ch-dark-theme .newsletter .form-control,
footer.ch-light-theme .newsletter .form-control {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(167,183,200,0.3) !important;
    color: #FFFFFF !important;
}
footer .newsletter .form-control::placeholder { color: rgba(167,183,200,0.6); }

/* Footer newsletter input — override Bootstrap white */
footer .newsletter,
footer .footer-top .newsletter {
    background: rgba(255,255,255,0.04) !important;
    border-radius: 10px;
    padding: 24px 28px !important;
}
footer input#input-newsletter,
footer .newsletter input[type="text"],
footer .newsletter input[type="email"],
footer .newsletter .form-control,
footer .footer-top .form-control,
footer.ch-dark-theme .newsletter .form-control,
footer.ch-light-theme .newsletter .form-control {
    background-color: rgba(255,255,255,0.10) !important;
    border: 1px solid rgba(167,196,220,0.35) !important;
    color: #FFFFFF !important;
    box-shadow: none !important;
    border-radius: 4px 0 0 4px !important;
}
footer .newsletter .form-control::placeholder,
footer input#input-newsletter::placeholder {
    color: rgba(167,196,220,0.55) !important;
}
/* Newsletter envelope icon — light on dark */
footer .icon-newsletter svg rect,
footer .icon-newsletter svg path {
    stroke: rgba(167,196,220,0.8) !important;
}

/* Footer subscribe button */
footer .btn-newsletter,
footer .btn-subscribe {
    background: #E8A900 !important;
    color: #0F2347 !important;
    font-weight: 700;
    border: none !important;
    border-radius: 0 4px 4px 0 !important;
}
footer .btn-newsletter:hover, footer .btn-subscribe:hover {
    background: #C9971A !important;
}

/* Footer banner (icons row) */
footer .box-banner-container,
footer .banner-footer,
footer .block-banner-footer { background-color: #162C50 !important; }
footer .banner-title-footer { color: #FFFFFF !important; font-weight: 600; }
footer .banner-description-footer { color: #8DAFC8 !important; font-size: 12px; }
footer .icon-banner-footer span { color: #E8A900 !important; }

/* Social icons in footer */
footer .sficon {
    background: rgba(255,255,255,0.08) !important;
    color: #8DAFC8 !important;
}
footer .sficon:hover {
    background: #E8A900 !important;
    color: #0F2347 !important;
}
footer .ch-socials li { display: inline-block; }

/* Payment icons in footer */
footer .ch-payments span {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border-radius: 6px;
}

/* Footer ribbon */
footer .footer-ribbon {
    background: #C9971A !important;
    color: #0F2347 !important;
    font-weight: 700;
}

/* Footer contact info */
footer .footer-contact a,
footer .footer-contact li { color: #7FA2BC !important; }
footer .footer-contact a:hover { color: #E8A900 !important; }

/* ============================================================
   EMPTY CATEGORY STATE — "Скоро в наявності"
   ============================================================ */
body.product-category #content > p {
    display: block;
    text-align: center;
    padding: 70px 20px 20px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1B3A6B;
    letter-spacing: 0.03em;
}
body.product-category #content > p::before {
    content: "\f02d";
    font-family: FontAwesome;
    display: block;
    font-size: 4rem;
    color: #C9971A;
    margin-bottom: 16px;
    font-weight: 400;
}
body.product-category #content > p::after {
    content: "Поповнення очікується найближчим часом";
    display: block;
    font-size: 1rem;
    font-weight: 400;
    color: #6A7A8A;
    margin-top: 10px;
    letter-spacing: 0;
}
body.product-category #content > p + .buttons { display: none; }
