/* CSS Design for Blackwell's Clone Page */

/* Base Styles & Core Variables */
:root {
    --primary-color: #002d62;       /* Deep navy blue */
    --primary-dark: #001d40;        /* Darker navy */
    --accent-color: #e01a52;         /* Hot pink-red for discount badges */
    --text-primary: #111111;        /* Off-black text */
    --text-muted: #666666;          /* Muted gray text */
    --author-color: #9f5b24;        /* Elegant amber/brown for authors */
    --bg-light: #f8f9fa;            /* Light gray background */
    --bg-warm: #f6f3ed;             /* Warm cream-beige background for signup banner */
    --border-color: #dadae5;        /* Light border color */
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-cursive: 'Playball', cursive;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: #ffffff;
    overflow-x: hidden;
}

/* Utility Header Styles */
.utility-header {
    background-color: #ffffff;
    font-size: 13px;
}

.utility-left-links a {
    color: #444444;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.utility-left-links a:hover {
    color: var(--primary-color);
}

.promo-badge {
    background-color: #eef6fc;
    color: var(--primary-color);
    font-weight: 600;
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 12px;
    display: inline-block;
    border: 1px solid #d2e4f5;
}

.currency-dropdown {
    font-size: 12px;
    padding: 2px 24px 2px 8px;
    border-color: var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    background-color: #ffffff;
}

.currency-dropdown:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

/* Brand Header Styles */
.brand-logo {
    font-family: 'Cinzel', serif;
    font-weight: 800;
    font-size: 34px;
    letter-spacing: 0.5px;
    color: #0c1c3a;
}

/* Search Bar Styles */
.search-group {
    border: 1px solid var(--border-color) !important;
    background-color: #ffffff;
    padding: 2px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-group:focus-within {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(0, 45, 98, 0.15);
}

.search-cat-btn {
    background-color: #f0f2f5 !important;
    font-size: 13px;
    font-weight: 500;
    color: #333333;
    border-right: 1px solid var(--border-color) !important;
    border-radius: 4px 0 0 4px !important;
    padding: 8px 16px;
}

.search-cat-btn:hover {
    background-color: #e4e7eb !important;
}

.search-input {
    font-size: 14px;
    color: #111111;
    font-weight: 500;
    padding-left: 12px;
}

.search-input:focus {
    box-shadow: none !important;
    outline: none !important;
}

.search-submit-btn {
    background: none !important;
    color: #333333;
    font-size: 16px;
    padding: 8px 16px;
    transition: color 0.2s ease;
}

.search-submit-btn:hover {
    color: var(--primary-color);
}

.advanced-search-link {
    font-size: 12px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.advanced-search-link:hover {
    text-decoration: underline;
}

/* Basket Widget */
.basket-widget-container {
    padding: 4px 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.basket-widget-container:hover {
    background-color: rgba(0, 45, 98, 0.03);
}

.basket-box {
    width: 44px;
    height: 44px;
    background-color: var(--primary-color);
    border-radius: 4px;
    color: #ffffff;
    font-size: 18px;
    transition: transform 0.2s ease;
}

.basket-count-badge {
    top: 4px !important;
    right: 4px !important;
    background-color: var(--accent-color) !important;
    color: #ffffff !important;
    font-size: 9px !important;
    padding: 3px 6px !important;
    border-radius: 50% !important;
    font-weight: 700;
}

.basket-text {
    line-height: 1.2;
}

.basket-title {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.basket-amount {
    font-size: 15px;
    color: var(--primary-color);
    font-weight: 700;
}

/* Basket Micro-animation */
@keyframes bump {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.basket-bump {
    animation: bump 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Sub Navigation Styles */
.sub-nav {
    background-color: #ffffff;
}

.sub-nav .nav-link {
    color: #4f4f4f;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.sub-nav .nav-link:hover {
    color: var(--primary-color);
}

.sub-nav .nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

.caret-icon {
    font-size: 10px;
    color: #888888;
}

/* Main Content Headings */
.search-title {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 32px;
    color: #1a1a1a;
}

.search-count {
    font-size: 14px;
}

.sort-dropdown {
    font-size: 13px;
    border-color: var(--border-color);
    cursor: pointer;
}

.sort-dropdown:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

/* Sidebar Filters Styling */
.filters-sidebar {
    background-color: #ffffff;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px;
    position: sticky;
    top: 90px;
}

.btn-hide-filters {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
}

.btn-hide-filters:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn-filter-toggle {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-filter-toggle:hover {
    background-color: var(--bg-light);
    border-color: #b0b0c0;
}

.filter-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Custom Range Slider (Double input overlay) */
.price-slider-container {
    position: relative;
    width: 100%;
    height: 40px;
    margin-top: 10px;
}

.price-slider-container input[type="range"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    outline: none;
    position: absolute;
    margin: auto;
    top: 0;
    bottom: 0;
    background-color: transparent;
    pointer-events: none;
}

.slider-track {
    width: 100%;
    height: 5px;
    position: absolute;
    margin: auto;
    top: 0;
    bottom: 0;
    border-radius: 5px;
}

.price-slider-container input[type="range"]::-webkit-slider-runnable-track {
    -webkit-appearance: none;
    height: 5px;
}

.price-slider-container input[type="range"]::-moz-range-track {
    -moz-appearance: none;
    height: 5px;
}

.price-slider-container input[type="range"]::-ms-track {
    appearance: none;
    height: 5px;
}

.price-slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 18px;
    width: 18px;
    background-color: #ffffff;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    margin-top: -6px;
    pointer-events: auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.1s ease, background-color 0.1s ease;
}

.price-slider-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background-color: #f0f4fa;
}

.price-slider-container input[type="range"]::-moz-range-thumb {
    -moz-appearance: none;
    height: 18px;
    width: 18px;
    background-color: #ffffff;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.price-slider-container input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
}

/* Publication Year Inputs */
.year-input {
    width: 65px;
    font-size: 13px;
    font-weight: 500;
    border-color: var(--border-color);
    border-radius: 4px;
}

.year-input:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

/* Format checkboxes */
.format-choices {
    gap: 8px;
}

.format-choices .form-check-input {
    cursor: pointer;
}

.format-choices .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.format-choices .form-check-input:focus {
    box-shadow: none;
}

/* Action Buttons */
.clear-filter-btn {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

.clear-filter-btn:hover {
    color: var(--primary-color);
}

.btn-refine {
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid var(--primary-color);
    transition: all 0.2s ease;
}

.btn-refine:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #ffffff;
}

/* Book Grid Cards Styles */
.product-card {
    background-color: #ffffff;
    border: 1px solid transparent;
    border-radius: 6px;
    transition: all 0.25s ease;
}

.product-card:hover {
    border-color: #f1f2f5;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transform: translateY(-4px);
}

.product-image-wrapper {
    height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
}

.product-image {
    max-height: 210px;
    object-fit: contain;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Circular Discount Badge Over Image */
.discount-badge {
    position: absolute;
    top: -5px;
    right: -15px;
    width: 48px;
    height: 48px;
    background-color: var(--accent-color);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.1;
    box-shadow: 0 2px 6px rgba(224, 26, 82, 0.4);
    z-index: 2;
    text-align: center;
    pointer-events: none;
}

/* Card Body text metadata */
.product-title {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 38px; /* Forces double line height for alignment */
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.product-title:hover {
    text-decoration: underline;
}

.product-author {
    font-size: 13px;
    color: var(--author-color);
    font-weight: 500;
    text-align: center;
}

.product-format {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.product-date {
    font-size: 12px;
    color: #888888;
    text-align: center;
}

.product-save-text {
    font-size: 12px;
    color: #d92552;
    font-weight: 600;
    text-align: center;
}

.product-price {
    font-size: 13px;
    text-align: center;
}

.price-rrp {
    color: #888888;
    font-size: 12px;
}

.price-actual {
    font-size: 15px;
    color: var(--text-primary);
}

/* Card Add Button */
.btn-add-basket {
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 4px;
    border: none;
    transition: all 0.2s ease;
}

.btn-add-basket:hover {
    background-color: var(--primary-dark);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 45, 98, 0.25);
}

/* Email Signup Banner */
.signup-banner-section {
    background-color: var(--bg-warm);
    border-top: 1px solid #e2ded5;
    border-bottom: 1px solid #e2ded5;
}

.signup-banner-title {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 26px;
    color: var(--primary-color);
}

.signup-cursive {
    font-family: var(--font-cursive);
    font-size: 40px;
    color: var(--primary-color);
    vertical-align: middle;
}

.signup-form {
    max-width: 500px;
}

.signup-input {
    border-color: #ccc;
    font-size: 14px;
    padding: 10px 16px;
    border-radius: 4px;
}

.signup-input:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

.btn-signup-submit {
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 4px;
    border: 1px solid var(--primary-color);
    transition: all 0.2s ease;
}

.btn-signup-submit:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #ffffff;
}

/* Blackwell Footer Styles */
.footer-list li {
    margin-bottom: 8px;
}

.footer-list a {
    color: #666666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-list a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.footer-social-list li {
    margin-bottom: 8px;
}

.footer-social-list a {
    color: #666666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-social-list a:hover {
    color: var(--primary-color);
}

.footer-social-icon {
    font-size: 15px;
    width: 20px;
    text-align: center;
    color: #555555;
}

.monogram-logo-container {
    opacity: 0.85;
}

.monogram-logo {
    max-width: 80px;
}

.footer-legal-links a {
    color: #666666;
    text-decoration: none;
    font-size: 12px;
}

.footer-legal-links a:hover {
    text-decoration: underline;
    color: var(--primary-color);
}

/* Cookie Pop-up banner */
.cookies-consent-popup {
    width: 350px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #eaebed !important;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.cookie-popup-title {
    font-size: 15px;
    font-weight: 700;
    color: #333333;
}

.cookie-popup-text {
    line-height: 1.4;
    font-size: 12px;
}

.btn-close-cookie {
    font-size: 10px;
    cursor: pointer;
}

.btn-close-cookie:focus {
    box-shadow: none;
}

/* Utilities */
.gap-x-4 {
    column-gap: 1.5rem;
}

.gap-y-2 {
    row-gap: 0.5rem;
}

/* Responsiveness adjustments */
@media (max-width: 991px) {
    .brand-logo {
        font-size: 28px;
    }
    
    .search-title {
        font-size: 26px;
    }
    
    .cookies-consent-popup {
        width: calc(100% - 2rem);
        margin: 1rem !important;
    }
}
