/* ================================================
   GTrends eBooks — Frontend Store CSS
   Modern HD Premium Design
================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@700;800&display=swap');

:root {
    --gteb-primary: #1a1a2e;
    --gteb-secondary: #16213e;
    --gteb-accent: #e94560;
    --gteb-gold: #f5a623;
    --gteb-green: #00d4aa;
    --gteb-text: #1a1a2e;
    --gteb-text-light: #64748b;
    --gteb-white: #ffffff;
    --gteb-bg: #f0f4f8;
    --gteb-card-bg: #ffffff;
    --gteb-shadow: 0 4px 24px rgba(0,0,0,0.10);
    --gteb-shadow-hover: 0 16px 48px rgba(0,0,0,0.20);
    --gteb-radius: 16px;
    --gteb-radius-sm: 8px;
    --gteb-transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ---- WRAPPER ---- */
.gteb-store-wrapper {
    font-family: 'Inter', sans-serif;
    background: var(--gteb-bg);
    min-height: 100vh;
}

/* ---- HERO ---- */
.gteb-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 80px 20px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.gteb-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(233,69,96,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.gteb-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}
.gteb-hero-badge {
    display: inline-block;
    background: rgba(233,69,96,0.2);
    border: 1px solid rgba(233,69,96,0.5);
    color: #ff8fa3;
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.gteb-hero-title {
    font-family: 'Playfair Display', serif !important;
    font-size: clamp(2rem, 5vw, 3.5rem) !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
    margin: 0 0 16px !important;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.gteb-hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    margin: 0 0 32px;
    font-weight: 400;
}

/* ---- SEARCH BAR ---- */
.gteb-search-bar {
    max-width: 500px;
    margin: 0 auto;
}
.gteb-search-bar input {
    width: 100%;
    padding: 16px 24px;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    color: #fff;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: var(--gteb-transition);
    box-sizing: border-box;
}
.gteb-search-bar input::placeholder { color: rgba(255,255,255,0.5); }
.gteb-search-bar input:focus {
    border-color: var(--gteb-accent);
    background: rgba(255,255,255,0.12);
}

/* ---- FILTER TABS ---- */
.gteb-filters {
    background: var(--gteb-white);
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}
.gteb-filter-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.gteb-filter-btn {
    padding: 10px 22px;
    border-radius: 50px;
    border: 2px solid #e2e8f0;
    background: transparent;
    color: var(--gteb-text-light);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--gteb-transition);
    white-space: nowrap;
}
.gteb-filter-btn:hover {
    border-color: var(--gteb-accent);
    color: var(--gteb-accent);
    background: rgba(233,69,96,0.05);
    transform: translateY(-1px);
}
.gteb-filter-btn.active {
    background: var(--gteb-accent);
    border-color: var(--gteb-accent);
    color: #fff;
    box-shadow: 0 4px 16px rgba(233,69,96,0.35);
}

/* ---- GRID ---- */
.gteb-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 28px;
}

/* ---- CARD ---- */
.gteb-card {
    background: var(--gteb-card-bg);
    border-radius: var(--gteb-radius);
    overflow: hidden;
    box-shadow: var(--gteb-shadow);
    transition: var(--gteb-transition);
    position: relative;
    display: flex;
    flex-direction: column;
    animation: gteb-fade-in 0.5s ease forwards;
}
.gteb-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--gteb-shadow-hover);
}
.gteb-card.hidden { display: none; }

@keyframes gteb-fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- BADGES ---- */
.gteb-badge-featured, .gteb-badge-sale {
    position: absolute;
    top: 14px;
    z-index: 10;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.gteb-badge-featured {
    left: 14px;
    background: linear-gradient(135deg, #f5a623, #f8872a);
    color: #fff;
    box-shadow: 0 2px 10px rgba(245,166,35,0.5);
}
.gteb-badge-sale {
    right: 14px;
    background: linear-gradient(135deg, #e94560, #c0392b);
    color: #fff;
    box-shadow: 0 2px 10px rgba(233,69,96,0.5);
}

/* ---- COVER IMAGE ---- */
.gteb-card-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
}
.gteb-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}
.gteb-card:hover .gteb-card-cover img {
    transform: scale(1.06);
}
.gteb-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: rgba(255,255,255,0.6);
    padding: 20px;
    text-align: center;
    box-sizing: border-box;
}
.gteb-cover-placeholder span { font-size: 4rem; margin-bottom: 12px; }
.gteb-cover-placeholder p { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.8); }

/* ---- OVERLAY ---- */
.gteb-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--gteb-transition);
    backdrop-filter: blur(4px);
}
.gteb-card:hover .gteb-card-overlay { opacity: 1; }

/* ---- CARD BODY ---- */
.gteb-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.gteb-cat-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--gteb-accent);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}
.gteb-card-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    margin: 0 0 6px !important;
    flex: 1;
}
.gteb-card-title a {
    color: var(--gteb-text) !important;
    text-decoration: none !important;
    transition: var(--gteb-transition);
}
.gteb-card-title a:hover { color: var(--gteb-accent) !important; }
.gteb-card-author {
    font-size: 13px;
    color: var(--gteb-text-light);
    margin: 0 0 10px;
}
.gteb-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.gteb-card-meta span {
    font-size: 11px;
    color: var(--gteb-text-light);
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 50px;
    font-weight: 500;
}
.gteb-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}

/* ---- PRICES ---- */
.gteb-price { font-size: 18px; font-weight: 800; color: var(--gteb-text); }
.gteb-price.gteb-free { color: var(--gteb-green); }
.gteb-old-price { font-size: 13px; color: var(--gteb-text-light); text-decoration: line-through; display: block; }
.gteb-sale-price { font-size: 18px; font-weight: 800; color: var(--gteb-accent); }

/* ---- BUTTONS ---- */
.gteb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    transition: var(--gteb-transition);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}
.gteb-btn-buy {
    background: linear-gradient(135deg, var(--gteb-accent), #c0392b);
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(233,69,96,0.35);
    flex: 1;
    justify-content: center;
}
.gteb-btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233,69,96,0.5);
    color: #fff !important;
}
.gteb-btn-preview {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.5);
    color: #fff !important;
    backdrop-filter: blur(10px);
}
.gteb-btn-preview:hover {
    background: rgba(255,255,255,0.25);
    color: #fff !important;
}

/* ---- EMPTY STATE ---- */
.gteb-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--gteb-text-light);
}
.gteb-empty span { font-size: 4rem; display: block; margin-bottom: 16px; }
.gteb-empty p { font-size: 1.1rem; }

/* ---- SINGLE EBOOK PAGE ---- */
.gteb-single-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px;
    font-family: 'Inter', sans-serif;
}
.gteb-single-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 48px;
    align-items: start;
}
.gteb-single-cover {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    position: sticky;
    top: 100px;
}
.gteb-single-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gteb-single-info { }
.gteb-single-cat {
    font-size: 12px;
    font-weight: 700;
    color: var(--gteb-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.gteb-single-title {
    font-family: 'Playfair Display', serif !important;
    font-size: 2.4rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    margin: 0 0 12px !important;
    color: var(--gteb-text) !important;
}
.gteb-single-author { color: var(--gteb-text-light); margin-bottom: 24px; font-size: 1rem; }
.gteb-single-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}
.gteb-meta-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    border: 1px solid #e2e8f0;
}
.gteb-meta-item .label { font-size: 11px; color: var(--gteb-text-light); text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-bottom: 6px; }
.gteb-meta-item .value { font-size: 15px; font-weight: 700; color: var(--gteb-text); }
.gteb-single-price-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    color: #fff;
}
.gteb-single-price-box .price-label { font-size: 13px; color: rgba(255,255,255,0.6); display: block; }
.gteb-single-price-box .final-price { font-size: 2.2rem; font-weight: 900; color: #fff; line-height: 1; }
.gteb-single-price-box .original-price { font-size: 14px; text-decoration: line-through; color: rgba(255,255,255,0.4); }
.gteb-single-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.gteb-btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50px;
    flex: 1;
    min-width: 180px;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: var(--gteb-transition);
}
.gteb-btn-buy-lg {
    background: linear-gradient(135deg, #e94560, #c0392b);
    color: #fff !important;
    box-shadow: 0 6px 20px rgba(233,69,96,0.4);
}
.gteb-btn-buy-lg:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(233,69,96,0.5); color:#fff !important; }
.gteb-btn-preview-lg {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: var(--gteb-text) !important;
}
.gteb-btn-preview-lg:hover { border-color: var(--gteb-accent); color: var(--gteb-accent) !important; }
.gteb-single-description { font-size: 15px; line-height: 1.8; color: #374151; }
.gteb-single-description h2 { font-family: 'Playfair Display', serif; font-size: 1.5rem; margin-bottom: 12px; }

/* ---- ADMIN STYLES ---- */
.gteb-meta-box { font-family: 'Inter', -apple-system, sans-serif; }
.gteb-meta-row { display: flex; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.gteb-meta-col { flex: 1; min-width: 220px; }
.gteb-meta-col.gteb-full-width { flex: 0 0 100%; }
.gteb-meta-col label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.gteb-meta-col input[type="text"],
.gteb-meta-col input[type="number"],
.gteb-meta-col select {
    width: 100%;
    padding: 9px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.gteb-meta-col input:focus, .gteb-meta-col select:focus {
    outline: none;
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233,69,96,0.1);
}
.gteb-file-input { display: flex; gap: 10px; }
.gteb-file-input input { flex: 1; }
.gteb-upload-btn { white-space: nowrap; }
.gteb-checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 600; }
.gteb-woo-notice {
    margin-top: 10px;
    padding: 12px 18px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    font-size: 13px;
    color: #15803d;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---- ADMIN SETTINGS ---- */
.gteb-settings-wrap { max-width: 700px; }
.gteb-payment-card { background: #fff; border-radius: 16px; padding: 32px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.gteb-payment-card h2 { font-size: 1.4rem; margin-bottom: 12px; }
.gteb-gateway-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 20px 0; }
.gteb-gateway-item {
    padding: 14px 18px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
}
.gteb-gateway-item.gteb-active { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
.gteb-notice-box {
    padding: 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    font-size: 13px;
    color: #1e40af;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .gteb-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 24px 16px; }
    .gteb-single-grid { grid-template-columns: 1fr; }
    .gteb-single-cover { position: static; max-width: 260px; margin: 0 auto; }
    .gteb-single-meta-grid { grid-template-columns: repeat(2, 1fr); }
    .gteb-hero { padding: 50px 16px 40px; }
}
@media (max-width: 480px) {
    .gteb-grid { grid-template-columns: 1fr; }
    .gteb-card-footer { flex-direction: column; align-items: stretch; }
}
