/* Fonts */
@font-face {
    font-family: 'Questrial';
    src: url('../fonts/questrial-v19-latin-regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Global Styles */
* {
    font-family: 'Questrial', sans-serif;
}

body {
    font-family: 'Questrial', sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-display {
    font-family: 'Questrial', sans-serif;
    color: var(--color-heading, #232f3f);
}

/* Custom scrollbar for webkit */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ================================================
   PRODUCT CARD STYLES
   ================================================ */
.product-card-title {
    font-family: 'Questrial', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1.2;
    margin-bottom: 0.15rem;
    color: var(--color-heading, #232f3f);
    transition: color 0.3s;
    overflow-wrap: break-word;
    /* Allows really long words to break */
    word-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* Limit to 3 lines max then truncate */
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dark .product-card-title {
    color: var(--color-heading, #232f3f);
}

.group:hover .product-card-title {
    color: var(--color-primary, #1E3A8A);
}

.product-card-author {
    font-size: 0.75rem;
    color: #232f3f;
    margin-bottom: 0.75rem;
    font-weight: 500;
    opacity: 0.8;
}

.dark .product-card-author {
    color: #232f3f;
}

.product-card-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: #232f3f;
}

.dark .product-card-price {
    color: #232f3f;
}

.product-card-price-sale {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-price-sale, #dc2626);
}

.dark .product-card-price-sale {
    color: var(--color-price-sale, #dc2626);
}



/* Ensure title and price are prominent */
.product-card-title {
    font-family: 'Questrial', sans-serif;
    line-height: 1.2;
}

.product-card-author {
    font-weight: 400;
}

/* ================================================
   BANNER STYLES
   ================================================ */
.banner-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: rgba(59, 130, 246, 0.2);
    color: #bfdbfe;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    border: 1px solid rgba(96, 165, 250, 0.3);
    backdrop-filter: blur(4px);
}

.banner-title {
    font-family: 'Questrial', sans-serif;
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 1rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.banner-subtitle {
    color: #e5e7eb;
    font-size: 1.125rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.banner-button {
    display: inline-block;
    background-color: var(--color-primary, #1E3A8A);
    color: #ffffff;
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    transform: translateY(0);
}

.banner-button:hover {
    background-color: var(--color-primary-hover, #172554);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* ================================================
   PAGE TITLE STYLES
   ================================================ */
.page-title {
    font-family: 'Questrial', sans-serif;
    font-size: clamp(1.875rem, 4vw, 2.25rem);
    font-weight: 700;
    color: var(--color-heading, #232f3f);
}

.dark .page-title {
    color: var(--color-heading, #232f3f);
}

.page-subtitle {
    color: var(--color-heading, #232f3f);
    margin-top: 0.5rem;
}

.dark .page-subtitle {
    color: #232f3f;
}

.section-title {
    font-family: 'Questrial', sans-serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--color-heading, #232f3f);
}

.dark .section-title {
    color: var(--color-heading, #232f3f);
}

/* ================================================
   BUTTON STYLES
   ================================================ */
.btn-primary {
    background-color: var(--color-primary, #1E3A8A);
    color: #ffffff;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: var(--color-primary-hover, #172554);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: #ffffff;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
}

.dark .btn-secondary {
    background-color: #1f2937;
    color: #d1d5db;
    border-color: #374151;
}

.btn-secondary:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-action-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    color: #374151;
    font-weight: 500;
    background-color: #ffffff;
    transition: all 0.2s;
    gap: 0.5rem;
}

.dark .btn-action-outline {
    background-color: #1f2937;
    border-color: #374151;
    color: #d1d5db;
}

.btn-action-outline:hover {
    background-color: var(--color-accent, #1e7a93);
    color: #ffffff;
    border-color: var(--color-accent, #1e7a93);
}

/* ================================================
   ADMIN PANEL STYLES
   ================================================ */
.admin-card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark .admin-card {
    background-color: #0f172a;
    border-color: #1e293b;
}

.admin-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}

.admin-table-header {
    background-color: #f8fafc;
    color: #64748b;
}

.dark .admin-table-header {
    background-color: #1e293b;
    color: #94a3b8;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    color: #475569;
    transition: all 0.3s;
}

.dark .admin-nav-link {
    color: #94a3b8;
}

.admin-nav-link:hover {
    background-color: #f8fafc;
    color: #1E3A8A;
}

.dark .admin-nav-link:hover {
    background-color: #1e293b;
}

.admin-nav-link-active {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    background-color: rgba(30, 58, 138, 0.1);
    color: #1E3A8A;
    font-weight: 500;
}

/* ================================================
   CONTACT FORM STYLES
   ================================================ */
.contact-card {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark .contact-card {
    background-color: #ffffff;
    border-color: #e2e8f0;
}

.form-input {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    padding: 0.5rem 0.75rem;
    color: #232f3f;
}

.dark .form-input {
    border-color: #cbd5e1;
    background-color: #ffffff;
    color: #232f3f;
}

.form-input:focus {
    outline: 2px solid #1E3A8A;
    outline-offset: 2px;
    border-color: #1E3A8A;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #232f3f;
    margin-bottom: 0.25rem;
}

.dark .form-label {
    color: #232f3f;
}



/* ================================================
   ALERT STYLES
   ================================================ */
.alert-success {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #f0fdf4;
    color: #16a34a;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.dark .alert-success {
    background-color: rgba(22, 163, 74, 0.2);
    color: #4ade80;
}

.alert-error {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #fef2f2;
    color: #dc2626;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.dark .alert-error {
    background-color: rgba(220, 38, 38, 0.2);
    color: #f87171;
}

/* ================================================
   POLICY PAGE STYLES
   ================================================ */
.policy-container {
    background-color: #ffffff;
}

.dark .policy-container {
    background-color: #ffffff;
}

.policy-title {
    color: #232f3f;
}

.dark .policy-title {
    color: #232f3f;
}

.policy-content {
    color: #232f3f;
}

.dark .policy-content {
    color: #232f3f;
}

.policy-content h3,
.policy-content h4 {
    color: #232f3f;
}

.dark .policy-content h3,
.dark .policy-content h4 {
    color: #232f3f;
}

.policy-content strong {
    color: #232f3f;
}

.dark .policy-content strong {
    color: #232f3f;
}

.policy-content a {
    color: #1E3A8A;
}

.policy-content a:hover {
    text-decoration: underline;
}

/* ================================================
   PRODUCT DETAIL PAGE STYLES
   ================================================ */
.product-detail-title {
    color: #232f3f;
}

.dark .product-detail-title {
    color: #232f3f;
}

.product-detail-label {
    color: #232f3f;
}

.dark .product-detail-label {
    color: #232f3f;
}

.product-detail-description {
    color: #232f3f;
}

.dark .product-detail-description {
    color: #232f3f;
}

.product-detail-description h3 {
    color: #232f3f;
}

.dark .product-detail-description h3 {
    color: #232f3f;
}

.product-purchase-card {
    background-color: #ffffff;
}

.dark .product-purchase-card {
    background-color: #ffffff;
}

.product-price-label {
    color: #232f3f;
}

.dark .product-price-label {
    color: #232f3f;
}

.product-price-value {
    color: #232f3f;
}

.dark .product-price-value {
    color: #232f3f;
}

.product-platform-text {
    color: #232f3f;
}

.dark .product-platform-text {
    color: #232f3f;
}

/* ================================================
   CONTACT PAGE ADDITIONAL STYLES
   ================================================ */
.contact-info-text {
    color: #232f3f;
}

.dark .contact-info-text {
    color: #232f3f;
}

.contact-info-label {
    color: #232f3f;
}

.dark .contact-info-label {
    color: #232f3f;
}

/* ================================================
   SEARCH DROPDOWN STYLES
   ================================================ */
.search-results-dropdown {
    top: calc(100% + 10px);
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.search-results-dropdown::-webkit-scrollbar {
    width: 6px;
}

.search-results-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.search-results-dropdown::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.search-results-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.search-results-dropdown .text-primary {
    color: #232f3f !important;
    /* Force dark color for price and view all link */
}

/* Specific override for the view all link to be bold and dark */
.search-results-dropdown a.text-primary {
    color: #232f3f !important;
}

.search-page-title {
    color: #232f3f !important;
}

.dark .search-page-title {
    color: #232f3f !important;
}

/* ================================================
   BUY MODAL STYLES
   ================================================ */
.buy-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.buy-modal-content {
    background-color: #ffffff;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.buy-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.2s;
    padding: 0.25rem;
    border-radius: 50%;
}

.buy-modal-close:hover {
    color: #374151;
    background-color: #f3f4f6;
}

/* ================================================
   BUY BUTTON STYLES
   ================================================ */
.btn-buy-red {
    background-color: var(--color-buy-btn, #dc2626);
    color: #ffffff;
}

.btn-buy-red:hover {
    background-color: var(--color-buy-btn-hover, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
}

.btn-google-books {
    background-color: #2563eb;
    color: #ffffff;
}

.btn-google-books:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
}

.btn-kobo {
    background-color: #ea580c;
    color: #ffffff;
}

.btn-kobo:hover {
    background-color: #c2410c;
    transform: translateY(-1px);
    box-shadow: 0 10px 25px -5px rgba(234, 88, 12, 0.4);
}

/* ================================================
   PRODUCT CARD BADGE STYLES
   ================================================ */
.product-badge-new {
    background-color: #16a34a;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.product-badge-ebook {
    background-color: #7c3aed;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.product-badge-discount {
    background-color: var(--color-price-sale, #dc2626);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.product-badge-discount-lg {
    font-size: 12px;
    padding: 0.3rem 0.6rem;
}

.product-badge-bestseller {
    background-color: var(--color-primary, #1E3A8A);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.product-badge-coming-soon {
    background-color: #d97706;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* ================================================
   PROMO BOX STYLES (Banner Altı 3'lü Vitrin)
   ================================================ */
.promo-box {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background-color: #1a2535;
}

.promo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}

.promo-box:hover img {
    transform: scale(1.06);
}

.promo-box-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
    padding: 2rem 1.25rem 1.25rem;
    transition: background 0.3s;
}

.promo-box:hover .promo-box-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.35) 60%, transparent 100%);
}

.promo-box-title {
    font-family: 'Questrial', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff !important;
    margin-bottom: 0.2rem;
    line-height: 1.2;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.promo-box-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.promo-box-arrow {
    display: inline-flex;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    gap: 0.25rem;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.25s, transform 0.25s;
}

.promo-box:hover .promo-box-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ================================================
   PRODUCT DETAIL FONT SIZE OVERRIDES
   ================================================ */
.product-detail-description p,
.product-detail-description h3,
.product-detail-label,
.product-detail-author-text {
    font-size: 1rem;
}

/* ================================================
   FOOTER SOCIAL ICONS
   ================================================ */
.footer-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    transition: all 0.3s ease;
}

.footer-social-icon:hover {
    background-color: var(--color-footer-accent, #fbb604);
    color: var(--color-header-bg, #121921);
    transform: translateY(-2px);
}