/* Custom styles */
.marquee {
    white-space: nowrap;
    overflow: hidden;
}
.marquee span {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 20s linear infinite;
}
@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* Dropdown styles */
.dropdown:hover .dropdown-menu {
    display: block;
}


/* 3D Book Card Styles */
.book-container {
    perspective: 1000px;
    transform-style: preserve-3d;
    height: 320px;
    position: relative;
    transition: transform 0.5s ease;
}

.book-container:hover {
    transform: rotateY(25deg) translateY(-10px);
}

.book {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform: rotateY(0deg);
    transition: transform 0.5s ease;
}

.book-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transform: translateZ(15px);
    border-radius: 2px;
    box-shadow: 
        0 0 5px rgba(0, 0, 0, 0.1),
        5px 5px 15px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-spine {
    position: absolute;
    width: 30px;
    height: 100%;
    left: -15px;
    top: 0;
    transform: rotateY(-90deg) translateX(-15px);
    background: linear-gradient(to right, #d4d4d4, #f3f3f3);
    border-radius: 2px 0 0 2px;
    box-shadow: inset -2px 0 5px rgba(0, 0, 0, 0.1);
}

.book-spine-title {
    position: absolute;
    width: 100%;
    top: 50%;
    left: 0;
    transform: translateY(-50%) rotate(-90deg);
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 5px;
}

.book-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transform: rotateY(180deg) translateZ(15px);
    background-color: #f8f8f8;
    border-radius: 2px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.book-details {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    transform: translateZ(16px);
}

.book-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-author {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-price {
    font-weight: bold;
    color: #6eb1aa;
    margin-bottom: 8px;
}

.book-btn {
    width: 100%;
    padding: 6px 0;
    background-color: #6eb1aa;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.book-btn:hover {
    background-color: #6eb1aa;
}

/* Book tag styles */
.book-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: bold;
    color: white;
    border-radius: 4px;
    z-index: 1;
    transform: translateZ(16px);
}

.tag-sale {
    background-color: #ef4444;
}

.tag-new {
    background-color: #10b981;
}

.tag-bestseller {
    background-color: #f59e0b;
}

.tag-preorder {
    background-color: #8b5cf6;
}

/* Rating stars */
.book-rating {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.book-rating .stars {
    color: #f59e0b;
    font-size: 10px;
}

.book-rating .count {
    font-size: 10px;
    color: #666;
    margin-left: 4px;
}

/* Book pages effect */
.book-pages {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: white;
    transform: rotateY(90deg) translateX(15px);
    transform-origin: right center;
}

.book-pages::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0.05) 0%, 
        rgba(0,0,0,0) 5%, 
        rgba(0,0,0,0) 95%, 
        rgba(0,0,0,0.05) 100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .book-container {
        height: 280px;
    }
}

@media (max-width: 640px) {
    .book-container {
        height: 240px;
    }
}