        body {
            background-color: #f8f9fa;
            color: #24285B;
        }
.bg-solid-white {
    background-color: whitesmoke !important;
}
.cart-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 40px;
  height: 40px;
}
.toast-container {
  position: fixed;     /* stays in place regardless of scroll */
  top: 30rem;           /* distance from top edge */
  right: 0.5rem;           /* center horizontally */
  z-index: 2000;       /* ensure above other UI */
}
.cart-icon {
  font-size: 1.5rem;
  color: #FFD200;
  transition: transform 0.3s;
  cursor: pointer;
}

.cart-icon:hover {
  transform: scale(1.1);
}
.cart-count:hover {
  transform: scale(1.1);
}

.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  background: #e74c3c;
  border-radius: 50%;
  color: white;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}
        .view {
            display: none;
        }

        .view.active {
            display: inherit;

        }


        .filter-section {
            background: white;
            padding: 1.5rem;
            border-radius: 8px;
            margin-bottom: 2rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .filter-group {
            margin-bottom: 1.5rem;
        }

        .filter-group:last-child {
            margin-bottom: 0;
        }

        .filter-group h3 {
            font-size: 1rem;
            margin-bottom: 1rem;
            color: #2c3e50;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .filter-items {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
        }

        .filter-tag {
            padding: 0.5rem 1rem;
            border: 2px solid #3498db;
            background: white;
            color: #3498db;
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.9rem;
            transition: all 0.3s;
        }

        .filter-tag:hover {
            background: #ecf0f1;
        }

        .filter-tag.active {
            background: #3498db;
            color: white;
        }

        .books-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
            gap: 2rem;
            margin-top: 2rem;
        }

        .loading {
            text-align: center;
            padding: 2rem;
            color: #7f8c8d;
        }

        .loading i {
            font-size: 2rem;
            margin-bottom: 1rem;
            display: block;
            animation: spin 2s linear infinite;
        }

        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .book-card {
            background: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            transition: all 0.3s;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        .book-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 8px 16px rgba(0,0,0,0.15);
        }

        .book-cover {
            width: 100%;
            height: 280px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 3rem;
            position: relative;
            overflow: hidden;
        }

        .book-cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .book-badge {
            position: absolute;
            top: 10px;
            right: 10px;
            background: #e74c3c;
            color: white;
            padding: 0.25rem 0.75rem;
            border-radius: 4px;
            font-size: 1rem;
            font-weight: bold;
        }

        .book-info {
            padding: 1.5rem;
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .book-title {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
            line-height: 1.3;
            color: #2c3e50;
        }

        .book-author {
            color: #7f8c8d;
            font-size: 0.9rem;
            margin-bottom: 0.75rem;
            font-style: italic;
        }

        .book-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }

        .tag-badge {
            display: inline-block;
            background: #ecf0f1;
            color: #2c3e50;
            padding: 0.2rem 0.6rem;
            border-radius: 10px;
            font-size: 0.7rem;
            cursor: pointer;
        }

        .tag-badge:hover {
            background: #bdc3c7;
        }

        .stars-rating {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.75rem;
        }

        .stars {
            color: #f39c12;
            font-size: 0.9rem;
            letter-spacing: 0.2rem;
        }


        .book-price {
            color: #3498db;
            font-size: 1.6rem;
            font-weight: bold;
            margin-bottom: 1rem;
            margin-top: auto;
        }

        .book-description {
            color: #7f8c8d;
            font-size: 0.85rem;
            line-height: 1.4;
            margin-bottom: 1rem;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }


        .book-detail {
            background: white;
            border-radius: 8px;
            padding: 2rem;
            max-width: 1200px;
            margin: 0 auto;
        }

        .detail-header {
            display: grid;
            grid-template-columns: 350px 1fr;
            gap: 3rem;
            margin-bottom: 2rem;
        }

        .detail-cover {
            width: 350px;
            height: 450px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 5rem;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            overflow: hidden;
        }

        .detail-cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .detail-info h1 {
            font-size: 2rem;
            margin-bottom: 0.5rem;
            color: #2c3e50;
        }

        .detail-author {
            color: #7f8c8d;
            font-size: 1.1rem;
            margin-bottom: 1rem;
            font-style: italic;
        }

        .detail-category {
            display: inline-block;
            background: #3498db;
            color: white;
            padding: 0.4rem 1rem;
            border-radius: 4px;
            font-size: 0.85rem;
            margin-bottom: 1rem;
            margin-right: 0.5rem;
        }

        .detail-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }

        .detail-tag {
            background: #ecf0f1;
            color: #2c3e50;
            padding: 0.3rem 0.8rem;
            border-radius: 12px;
            font-size: 0.8rem;
            cursor: pointer;
        }

        .detail-tag:hover {
            background: #bdc3c7;
        }

        .detail-rating {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1.5rem;
            padding-bottom: 1.5rem;
            border-bottom: 1px solid #ecf0f1;
        }

        .detail-rating .stars {
            font-size: 1.3rem;
        }

        .detail-rating-info {
            color: #7f8c8d;
        }

        .detail-price {
            color: #3498db;
            font-size: 2.5rem;
            font-weight: bold;
            margin-bottom: 1rem;
        }

        .detail-description {
            color: #555;
            margin-bottom: 1.5rem;
            line-height: 1.8;
            font-size: 1rem;
        }

        .book-meta {
            background: #ecf0f1;
            padding: 1rem;
            border-radius: 4px;
            margin-bottom: 1.5rem;
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
        }

        .meta-item {
            text-align: center;
        }

        .meta-label {
            color: #7f8c8d;
            font-size: 0.85rem;
            display: block;
            margin-bottom: 0.25rem;
        }

        .meta-value {
            color: #2c3e50;
            font-weight: 600;
            font-size: 1rem;
        }

        .quantity-selector {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1.5rem;
        }

        .quantity-selector button {
            width: 40px;
            height: 40px;
            border: 1px solid #3498db;
            background: white;
            color: #3498db;
            cursor: pointer;
            border-radius: 4px;
            font-size: 1.1rem;
        }

        .quantity-selector input {
            width: 60px;
            padding: 0.5rem;
            border: 1px solid #ddd;
            border-radius: 4px;
            text-align: center;
            font-size: 1rem;
        }
 .toastsuccess {
            background-color:#2ecc71;
        }

        .toasterror {
            background-color:#e74c3c;
        }

        .toastinfo {
            background-color: #3498db;
        }

        .toast-icon {
            font-size: 1.3rem;
        }

        .success .toast-icon {
            color: #2ecc71;
        }

        .error .toast-icon {
            color: #e74c3c;
        }

        .info .toast-icon {
            color: #3498db;
        }

#flipbookSlider.hidden { display: none; }
#detailCover { position: relative; }
#flipbookSlider {
  position: absolute;
  top: 0;
  left: 100%;
  width: 300px;
  background: #fff;
  border: 1px solid #ccc;
  z-index: 10;
}
        .flipbook-section {
            margin-top: 2rem;
            padding-top: 2rem;
            border-top: 2px solid #ecf0f1;
        }

        .flipbook-container {
            background: #f8f9fa;
            border-radius: 8px;
            padding: 1.5rem;
            margin: 1.5rem 0;
        }

        .flipbook-viewer {
            width: 100%;
            height: 500px;
            background: white;
            border-radius: 4px;
            position: relative;
            overflow: hidden;
        }

        .flipbook-page {
            width: 100%;
            height: 100%;
            position: absolute;
            display: none;
            align-items: center;
            justify-content: center;
        }

        .flipbook-page.active {
            display: flex;
        }

        .flipbook-page img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }

        .flipbook-controls {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 1rem;
            margin-top: 1rem;
        }

        .flipbook-controls button {
            padding: 0.5rem 1rem;
            background: #3498db;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }

        .flipbook-controls button:hover {
            background: #2980b9;
        }

        .flipbook-controls button:disabled {
            background: #bdc3c7;
            cursor: not-allowed;
        }

        .flipbook-info {
            text-align: center;
            margin-top: 1rem;
            color: #7f8c8d;
        }

        .back-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 1rem;
            color: #3498db;
            cursor: pointer;
            text-decoration: none;
            font-weight: 500;
        }

        .back-btn:hover {
            text-decoration: underline;
        }

        .cart-view {
            background: white;
            border-radius: 8px;
            padding: 2rem;
            max-width: 900px;
            margin: 0 auto;
        }

        .cart-empty {
            text-align: center;
            padding: 3rem 2rem;
            color: #7f8c8d;
        }

        .cart-empty i {
            font-size: 3rem;
            margin-bottom: 1rem;
            display: block;
        }

        .cart-items {
            margin-bottom: 2rem;
        }

        .cart-item {
            display: grid;
            grid-template-columns: 100px 1fr 1fr 1fr auto auto;
            gap: 1.5rem;
            align-items: center;
            padding: 1.5rem;
            border: 1px solid #ecf0f1;
            border-radius: 4px;
            margin-bottom: 1rem;
        }

        .cart-item-cover {
            width: 100px;
            height: 140px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 2.5rem;
            overflow: hidden;
        }

        .cart-item-cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .remove-item {
            color: #e74c3c;
            cursor: pointer;
            font-weight: bold;
            font-size: 1.5rem;
        }

        .remove-item:hover {
            transform: scale(1.2);
        }

        .cart-summary {
            background: #f8f9fa;
            padding: 1.5rem;
            border-radius: 4px;
            margin-top: 2rem;
        }

        .summary-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.75rem;
            font-size: 1rem;
        }

        .summary-row.total {
            font-size: 1.3rem;
            font-weight: bold;
            color: #3498db;
            border-top: 2px solid #ddd;
            padding-top: 1rem;
            margin-top: 1rem;
        }

        .checkout-form {
            background: white;
            border-radius: 8px;
            padding: 2rem;
            max-width: 600px;
            margin: 0 auto;
        }

        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
            color: #2c3e50;
        }

        .form-group input,
        .form-group select {
            width: 100%;
            padding: 0.75rem;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 1rem;
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
        }

        .order-summary {
            background: #f8f9fa;
            padding: 1.5rem;
            border-radius: 8px;
            margin-bottom: 2rem;
        }

        .order-summary h3 {
            margin-bottom: 1rem;
            color: #2c3e50;
        }

        .search-bar {
            margin-bottom: 2rem;
            display: flex;
            gap: 1rem;
        }

        .search-bar input {
            flex: 1;
            max-width: 500px;
            padding: 0.75rem;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 1rem;
        }


        @keyframes slideIn {
            from {
                transform: translateX(400px);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        @media (max-width: 768px) {
            .detail-header {
                grid-template-columns: 1fr;
            }

            .detail-cover {
                width: 100%;
                max-width: 300px;
                margin: 0 auto;
            }

            .cart-item {
                grid-template-columns: 1fr;
                gap: 1rem;
            }

            .books-grid {
                grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
                gap: 1rem;
            }

            .form-row {
                grid-template-columns: 1fr;
            }

            .book-meta {
                grid-template-columns: 1fr;
            }

            .config-section {
                flex-direction: column;
            }

            .config-input {
                min-width: 100%;
            }

            .flipbook-viewer {
                height: 300px;
            }

            .detail-header {
                grid-template-columns: 1fr;
            }
            .filter-section {
                margin-bottom: 1rem;
            }
          
        }