/* Kings Bakery - Shared Styles */
/* Common styles used across all pages */

/* Shopping Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-sidebar-header {
    padding: 2rem;
    background: linear-gradient(135deg, #6B3410 0%, #8B5A3C 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-sidebar-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    margin: 0;
}

.cart-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: transform 0.3s;
}

.cart-close-btn:hover {
    transform: rotate(90deg);
}

.cart-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: #999;
}

.cart-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #6B3410;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.cart-item-retail-price {
    text-decoration: line-through;
    opacity: 0.6;
    margin-right: 0.5rem;
}

.cart-item-wholesale-badge {
    display: inline-block;
    background: #2ECC71;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-qty-btn {
    background: #f5f5f5;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    color: #6B3410;
    transition: all 0.2s;
}

.cart-qty-btn:hover {
    background: #FFD700;
}

.cart-qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.cart-qty-display {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: #6B3410;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #DC2626;
    cursor: pointer;
    padding: 0.3rem;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.cart-item-remove:hover {
    transform: scale(1.2);
}

.cart-sidebar-footer {
    border-top: 2px solid #eee;
    padding: 1.5rem;
    background: #fafafa;
}

.wholesale-alert {
    background: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.wholesale-progress {
    background: #FFF3CD;
    color: #856404;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.wholesale-progress-bar {
    background: #f0f0f0;
    height: 8px;
    border-radius: 4px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.wholesale-progress-fill {
    background: linear-gradient(90deg, #6B3410, #FFD700);
    height: 100%;
    transition: width 0.3s ease;
}

.cart-summary {
    margin-bottom: 1rem;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.cart-summary-row.total {
    border-top: 2px solid #ddd;
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #6B3410;
}

.cart-savings {
    color: #2ECC71;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 600;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-checkout {
    background: linear-gradient(135deg, #6B3410 0%, #8B5A3C 100%);
    color: #FFD700;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    display: block;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(107, 52, 16, 0.3);
}

.btn-continue {
    background: #f5f5f5;
    color: #6B3410;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-continue:hover {
    background: white;
    border-color: #6B3410;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #6B3410;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Breadcrumb navigation */
.breadcrumb {
    padding: 1rem 5%;
    background: #f9f9f9;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #6B3410;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: #999;
}

/* Star rating display */
.star-rating {
    color: #FFD700;
    font-size: 1rem;
}

.star-rating .star {
    display: inline-block;
}

.star-rating .star.empty {
    color: #ddd;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge-error {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-info {
    background: #DBEAFE;
    color: #1E40AF;
}

/* Form styles */
.form-error {
    color: #DC2626;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.input-error {
    border-color: #DC2626 !important;
}

/* Utility classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.font-bold { font-weight: 700; }
.text-muted { color: #999; }

/* Benefit Icons */
.benefit-icon {
    font-size: 0;
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.benefit-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.benefit:hover .benefit-icon img {
    transform: scale(1.1) rotate(5deg);
}

