/* Vanguard Store Template Styles */

/* Store Header */
.vanguard-store-header {
    background: linear-gradient(135deg, #d63384 0%, #6f42c1 100%);
    background-size: cover;
    background-position: center;
    min-height: 250px;
    position: relative;
}

.store-header-overlay {
    background: rgba(0, 0, 0, 0.4);
    min-height: 250px;
    display: flex;
    align-items: flex-end;
    padding: 30px;
}

.store-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.store-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.store-info {
    color: white;
}

.store-name {
    font-size: 32px;
    margin: 0 0 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.store-meta {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

/* Store Content */
.vanguard-store-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Owner Notice */
.store-owner-notice {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #28a745;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 30px;
}

.store-owner-notice p {
    margin: 0;
    color: #155724;
}

.store-owner-notice a {
    color: #155724;
    font-weight: 600;
}

/* No Books Notice */
.no-books-notice {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.no-books-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.no-books-notice h3 {
    font-size: 24px;
    margin: 0 0 10px;
    color: #333;
}

.no-books-notice p {
    color: #666;
    margin: 0 0 20px;
}

.btn-add-books {
    display: inline-block;
    background: linear-gradient(135deg, #d63384 0%, #e91e8c 100%);
    color: white !important;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-add-books:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(214, 51, 132, 0.4);
}

/* Books Grid */
.vanguard-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

/* Book Card */
.book-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.book-image-link {
    display: block;
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: #f0f0f0;
}

.book-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.book-card:hover .book-cover {
    transform: scale(1.05);
}

/* Condition Badge */
.condition-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cond-like_new, .cond-like-new {
    background: #d4edda;
    color: #155724;
}

.cond-good {
    background: #fff3cd;
    color: #856404;
}

.cond-acceptable {
    background: #f8d7da;
    color: #721c24;
}

/* Book Details */
.book-details {
    padding: 15px;
}

.book-title {
    font-size: 14px;
    margin: 0 0 5px;
    line-height: 1.4;
}

.book-title a {
    color: #333;
    text-decoration: none;
}

.book-title a:hover {
    color: #d63384;
}

.book-author {
    font-size: 12px;
    color: #666;
    margin: 0 0 12px;
}

/* Book Actions */
.book-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-trade, .btn-buy, .btn-login {
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    display: block;
}

.btn-trade {
    background: linear-gradient(135deg, #d63384 0%, #e91e8c 100%);
    color: white;
}

.btn-trade:hover {
    background: linear-gradient(135deg, #c22b76 0%, #d11a7a 100%);
    transform: translateY(-1px);
}

.btn-buy {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-buy:hover {
    background: linear-gradient(135deg, #218838 0%, #1baa80 100%);
    transform: translateY(-1px);
}

.btn-login {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.btn-login:hover {
    background: #e9ecef;
    color: #333;
}

.owner-label {
    display: block;
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 12px;
    color: #666;
}

/* Loading state */
.btn-trade.loading, .btn-buy.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Success state */
.btn-trade.added, .btn-buy.added {
    background: #28a745 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .store-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .store-name {
        font-size: 24px;
    }
    
    .vanguard-books-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .book-details {
        padding: 12px;
    }
    
    .book-title {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .vanguard-books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .btn-trade, .btn-buy {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Toast notification */
.vanguard-store-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.vanguard-store-toast.visible {
    transform: translateY(0);
    opacity: 1;
}

.vanguard-store-toast .toast-message {
    font-weight: 600;
    margin-bottom: 10px;
}

.vanguard-store-toast .toast-actions {
    display: flex;
    gap: 10px;
}

.vanguard-store-toast .toast-btn {
    background: white;
    color: #28a745;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

/* Persistent Floating Trade Basket */
.vanguard-floating-basket {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #d63384 0%, #e91e8c 100%);
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(214, 51, 132, 0.4);
    z-index: 99999;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.vanguard-floating-basket.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.vanguard-floating-basket.pulse {
    animation: basket-pulse 0.3s ease;
}

@keyframes basket-pulse {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.1); }
    100% { transform: translateX(-50%) scale(1); }
}

.vanguard-floating-basket .basket-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}

.vanguard-floating-basket .basket-link:hover {
    color: white;
}

.vanguard-floating-basket .basket-icon {
    font-size: 20px;
}

.vanguard-floating-basket .basket-text {
    white-space: nowrap;
}

.vanguard-floating-basket .basket-count {
    background: #ffc107;
    color: #333;
    min-width: 26px;
    height: 26px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.vanguard-floating-basket .basket-minimize {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    margin-right: 10px;
    transition: all 0.2s;
}

.vanguard-floating-basket .basket-minimize:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Minimized state */
.vanguard-floating-basket.minimized .basket-text {
    display: none;
}

.vanguard-floating-basket.minimized {
    border-radius: 50%;
}

.vanguard-floating-basket.minimized .basket-link {
    padding: 12px;
}

.vanguard-floating-basket.minimized .basket-minimize {
    display: none;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .vanguard-floating-basket {
        bottom: 70px; /* Above mobile nav */
    }
    
    .vanguard-floating-basket .basket-link {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .vanguard-floating-basket .basket-icon {
        font-size: 18px;
    }
}
