/* ==========================================================================
   ICAS Bookstore (eShop) Premium Modern CSS Theme
   ========================================================================== */

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

:root {
    --eshop-primary: #6366f1;         /* Indigo 500 */
    --eshop-primary-hover: #4f46e5;   /* Indigo 600 */
    --eshop-primary-light: rgba(99, 102, 241, 0.1);
    --eshop-secondary: #0f172a;       /* Slate 900 */
    --eshop-secondary-light: #1e293b; /* Slate 800 */
    --eshop-accent: #14b8a6;          /* Teal 500 */
    --eshop-accent-hover: #0d9488;    /* Teal 600 */
    --eshop-bg: #f8fafc;              /* Slate 50 */
    --eshop-card-bg: #ffffff;
    --eshop-text: #1e293b;            /* Slate 800 */
    --eshop-text-muted: #64748b;      /* Slate 500 */
    --eshop-border: #e2e8f0;          /* Slate 200 */
    --eshop-border-focus: #a5b4fc;    /* Indigo 300 */
    --eshop-success: #10b981;         /* Emerald 500 */
    --eshop-danger: #ef4444;          /* Red 500 */
    --eshop-warning: #f59e0b;         /* Amber 500 */
    --eshop-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --eshop-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --eshop-radius: 16px;
    --eshop-radius-lg: 24px;
    --eshop-font: 'Outfit', sans-serif;
}

/* Base resets & typography for bookstore context */
.bookstore-modern {
    font-family: var(--eshop-font);
    color: var(--eshop-text);
    background-color: var(--eshop-bg);
    min-height: 100vh;
}

/* Universal Bookstore container styling to ensure consistent alignment */
.eshop-container {
    font-family: var(--eshop-font);
    background-color: var(--eshop-bg);
}

/* Public layout adjustments */
.app.bookstore-public-layout {
    background: var(--eshop-bg);
}

.app.bookstore-public-layout .app-content.bookstore-public-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 1.5rem 1.5rem 3rem;
}

@media (min-width: 1200px) {
    .app.bookstore-public-layout .app-content.bookstore-public-content {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

/* Hero Banner */
.eshop-hero-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #311042 100%);
    border-radius: var(--eshop-radius-lg);
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--eshop-shadow-lg);
    margin-bottom: 2.5rem;
}
.eshop-hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
    border-radius: 50%;
}
.eshop-hero-banner::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}
.eshop-hero-title {
    color: #ffffff;
    font-weight: 800;
    font-size: 2.5rem;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}
.eshop-hero-subtitle {
    color: #cbd5e1;
    font-size: 1.1rem;
    max-width: 650px;
    line-height: 1.6;
}

/* Floating Cart Link Button */
.btn-eshop-cart {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--eshop-radius);
    padding: 0.75rem 1.5rem;
    color: #ffffff;
    text-decoration: none;
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}
.btn-eshop-cart:hover {
    background: #ffffff;
    color: var(--eshop-primary-hover);
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(255, 255, 255, 0.25);
}

/* Filtering & Search Card */
.eshop-filter-card {
    background: var(--eshop-card-bg);
    border: 1px solid var(--eshop-border);
    border-radius: var(--eshop-radius);
    box-shadow: var(--eshop-shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.eshop-search-wrapper {
    position: relative;
}
.eshop-search-wrapper .search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--eshop-text-muted);
    font-size: 1.1rem;
}
.eshop-search-input {
    padding-left: 2.75rem;
    height: 3.25rem;
    border-radius: 12px;
    border: 1px solid var(--eshop-border);
    font-size: 0.95rem;
    transition: all 0.25s ease;
    background-color: #f8fafc;
}
.eshop-search-input:focus {
    background-color: #ffffff;
    border-color: var(--eshop-border-focus);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
    outline: none;
}

.btn-eshop-action {
    background: linear-gradient(135deg, var(--eshop-primary) 0%, var(--eshop-primary-hover) 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    height: 3.25rem;
    transition: all 0.25s ease;
}
.btn-eshop-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -3px rgba(99, 102, 241, 0.35);
    color: #ffffff;
}

.btn-eshop-reset {
    background: #f1f5f9;
    border: 1px solid var(--eshop-border);
    color: var(--eshop-text-muted);
    border-radius: 12px;
    font-weight: 500;
    height: 3.25rem;
    transition: all 0.25s ease;
}
.btn-eshop-reset:hover {
    background: #e2e8f0;
    color: var(--eshop-secondary);
}

/* Category Pills scrollbar styling */
.category-scroll-wrapper {
    overflow-x: auto;
    scrollbar-width: none;
}
.category-scroll-wrapper::-webkit-scrollbar {
    display: none;
}
.category-pill {
    background: #ffffff;
    border: 1px solid var(--eshop-border);
    color: var(--eshop-text-muted);
    border-radius: 10px;
    padding: 0.6rem 1.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.category-pill:hover {
    background: #f8fafc;
    color: var(--eshop-secondary);
    border-color: #cbd5e1;
    transform: translateY(-1px);
}
.category-pill.active {
    background: var(--eshop-secondary);
    color: #ffffff;
    border-color: var(--eshop-secondary);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

/* Book Card Design */
.eshop-book-card {
    background: var(--eshop-card-bg);
    border: 1px solid var(--eshop-border);
    border-radius: var(--eshop-radius);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--eshop-shadow);
}
.eshop-book-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--eshop-shadow-lg);
    border-color: rgba(99, 102, 241, 0.25);
}

.eshop-img-wrapper {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #f1f5f9;
}
.eshop-img-wrapper img {
    max-height: 195px;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.eshop-book-card:hover .eshop-img-wrapper img {
    transform: scale(1.06) rotate(1deg);
}

.eshop-img-placeholder {
    font-size: 5rem;
    color: var(--eshop-text-muted);
    opacity: 0.5;
    transition: transform 0.4s ease;
}
.eshop-book-card:hover .eshop-img-placeholder {
    transform: scale(1.1);
}

.eshop-card-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.category-badge-pill {
    background-color: var(--eshop-primary-light);
    color: var(--eshop-primary-hover);
    font-weight: 700;
    font-size: 0.72rem;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 0.75rem;
    align-self: flex-start;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.eshop-card-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--eshop-secondary);
    line-height: 1.4;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8rem;
}
.eshop-card-author {
    color: var(--eshop-text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.eshop-price-row {
    border-top: 1px dashed var(--eshop-border);
    padding-top: 1.25rem;
    margin-top: auto;
}

.price-strike {
    text-decoration: line-through;
    color: var(--eshop-text-muted);
    font-size: 0.82rem;
}

.price-actual {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--eshop-secondary);
}
.price-actual.discounted {
    color: var(--eshop-danger);
}

.discount-tag {
    background: #fee2e2;
    color: var(--eshop-danger);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    margin-left: 0.5rem;
    display: inline-block;
    vertical-align: middle;
}

.stock-indicator {
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.stock-indicator.in-stock {
    color: var(--eshop-success);
}
.stock-indicator.out-of-stock {
    color: var(--eshop-danger);
}
.stock-node {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.stock-node.in {
    background-color: var(--eshop-success);
    box-shadow: 0 0 8px var(--eshop-success);
}
.stock-node.out {
    background-color: var(--eshop-danger);
}

/* Premium Card and Table containers */
.eshop-card {
    background: var(--eshop-card-bg);
    border: 1px solid var(--eshop-border);
    border-radius: var(--eshop-radius);
    box-shadow: var(--eshop-shadow);
    overflow: hidden;
}
.eshop-card-header {
    background: linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%) !important;
    border-bottom: 1px solid var(--eshop-border);
    padding: 1.25rem 1.5rem;
}

/* Tables styling */
.eshop-table-responsive {
    border-radius: var(--eshop-radius);
    overflow: hidden;
    border: 1px solid var(--eshop-border);
}
.eshop-table {
    margin-bottom: 0;
}
.eshop-table thead th {
    background: #f1f5f9;
    color: var(--eshop-secondary);
    font-weight: 600;
    border-bottom: 2px solid var(--eshop-border);
    padding: 1rem;
    font-size: 0.88rem;
}
.eshop-table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--eshop-border);
}

/* Buttons overrides */
.btn-eshop-primary {
    background: linear-gradient(135deg, var(--eshop-primary) 0%, var(--eshop-primary-hover) 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-eshop-primary:hover {
    background: linear-gradient(135deg, var(--eshop-primary-hover) 0%, #3730a3 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    color: #ffffff;
}

.btn-eshop-secondary {
    border: 1.5px solid var(--eshop-border);
    background: #ffffff;
    color: var(--eshop-text-muted);
    font-weight: 600;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-eshop-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--eshop-secondary);
}

.btn-eshop-danger {
    background: linear-gradient(135deg, var(--eshop-danger) 0%, #b91c1c 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-eshop-danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
    color: #ffffff;
}

/* Coupon/Ticket designs */
.coupon-ticket {
    border: 2px dashed var(--eshop-border);
    border-radius: 12px;
    padding: 1rem;
    background: #faf5ff;
    position: relative;
    transition: all 0.25s ease;
}
.coupon-ticket.eligible {
    border-color: #c084fc;
    background: #faf5ff;
}
.coupon-ticket.ineligible {
    opacity: 0.65;
    border-color: var(--eshop-border);
    background: #f8fafc;
}
.coupon-ticket:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.02);
}
.coupon-code-badge {
    background: var(--eshop-secondary);
    color: #ffffff;
    font-family: monospace;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    display: inline-block;
}

/* Input Fields styling */
.eshop-form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--eshop-secondary);
    margin-bottom: 0.4rem;
}
.eshop-form-control {
    border-radius: 10px;
    border: 1px solid var(--eshop-border);
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    background-color: #f8fafc;
}
.eshop-form-control:focus {
    background-color: #ffffff;
    border-color: var(--eshop-border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    outline: none;
}

/* Track Order Timeline styling */
.eshop-timeline-container {
    position: relative;
    padding-left: 2.5rem;
}
.eshop-timeline-container::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: var(--eshop-border);
}
.eshop-timeline-node {
    position: absolute;
    left: 0;
    top: 2px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: var(--eshop-shadow);
}
.eshop-timeline-item {
    position: relative;
    margin-bottom: 2rem;
}
.eshop-timeline-item:last-child {
    margin-bottom: 0;
}
.eshop-timeline-item.active {
    font-weight: 600;
}

/* Detail view carousel modifications */
.detail-carousel-wrapper {
    background: #f8fafc;
    border-radius: var(--eshop-radius);
    padding: 1.5rem;
    border: 1px solid var(--eshop-border);
}
.detail-thumbnail-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}
.detail-thumbnail-img:hover,
.detail-thumbnail-img.active {
    border-color: var(--eshop-primary);
    transform: scale(1.05);
}

/* Badges override */
.badge-eshop-status {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 30px;
}
.badge-eshop-status.paid {
    background-color: #d1fae5;
    color: #065f46;
}
.badge-eshop-status.pending {
    background-color: #fef3c7;
    color: #92400e;
}
.badge-eshop-status.failed {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Sales Dashboard card classes */
.kpi-gradient-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #312e81 100%) !important;
}
.kpi-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #064e3b 100%) !important;
}
.kpi-gradient-info {
    background: linear-gradient(135deg, #06b6d4 0%, #164e63 100%) !important;
}
.kpi-gradient-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #78350f 100%) !important;
    color: #ffffff !important;
}
.kpi-gradient-danger {
    background: linear-gradient(135deg, #ef4444 0%, #7f1d1d 100%) !important;
}
.kpi-gradient-secondary {
    background: linear-gradient(135deg, #64748b 0%, #334155 100%) !important;
}

.kpi-card {
    border-radius: var(--eshop-radius);
    border: none;
    transition: transform 0.25s ease;
}
.kpi-card:hover {
    transform: translateY(-3px);
}
