/*
 * Homeplate CMS — Store Components
 *
 * Centralized stylesheet for all store-related UI components.
 * Templates can override any value via CSS custom properties.
 *
 * Injected automatically on pages containing {{shopping:*}} shortcodes
 * or store/cart/checkout/product/order-confirmation pages.
 */

/* ========================================
   CSS Custom Properties (Theme Variables)
   ======================================== */
:root {
    /* Colors */
    --store-primary: var(--primary, #4f46e5);
    --store-primary-hover: var(--primary-dark, #4338ca);
    --store-primary-light: rgba(79, 70, 229, 0.05);
    --store-danger: #ef4444;
    --store-danger-light: #fee2e2;
    --store-danger-hover: #fecaca;
    --store-success: #10b981;
    --store-success-light: #ecfdf5;
    --store-warning: #f59e0b;
    --store-warning-light: #fff3cd;
    --store-info: #3b82f6;

    /* Text */
    --store-text-primary: #1f2937;
    --store-text-secondary: #6b7280;
    --store-text-tertiary: #9ca3af;
    --store-text-muted: #666;

    /* Borders */
    --store-border: #e5e7eb;
    --store-border-dark: #d1d5db;

    /* Backgrounds */
    --store-bg: #ffffff;
    --store-bg-secondary: #f9fafb;
    --store-bg-tertiary: #f3f4f6;

    /* Spacing */
    --store-radius: 0.5rem;
    --store-radius-lg: 0.75rem;
    --store-radius-xl: 12px;
    --store-radius-full: 9999px;

    /* Shadows */
    --store-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --store-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --store-shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);

    /* Grid */
    --store-grid-columns: 3;
    --store-grid-min: 280px;
    --store-grid-gap: 2rem;

    /* Transitions */
    --store-transition: all 0.3s ease;

    /* Z-index */
    --store-z-notification: 9999;
    --store-z-overlay: 2147483647;
}

/* ========================================
   Shared Keyframes
   ======================================== */
@keyframes store-slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes store-slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Aliases for backward compat with JS references */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@keyframes store-spin {
    to { transform: rotate(360deg); }
}

@keyframes store-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   Buttons
   ======================================== */
.cart-add-btn,
.cart-add-button {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: var(--store-primary);
    color: white;
    border: none;
    border-radius: var(--store-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--store-transition);
}

.cart-add-btn:hover,
.cart-add-button:hover {
    background: var(--store-primary-hover);
}

.cart-add-btn:disabled {
    background: var(--store-text-tertiary);
    cursor: not-allowed;
}

.cart-remove-btn {
    padding: 0.5rem 1rem;
    background: var(--store-danger-light);
    color: var(--store-danger);
    border: none;
    border-radius: var(--store-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--store-transition);
}

.cart-remove-btn:hover {
    background: var(--store-danger-hover);
}

.cart-checkout-btn {
    width: 100%;
    padding: 1rem;
    background: var(--store-primary);
    color: white;
    border: none;
    border-radius: var(--store-radius-lg);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--store-transition);
    text-decoration: none;
    text-align: center;
    display: block;
}

.cart-checkout-btn:hover {
    background: var(--store-primary-hover);
    color: #fff;
}

.cart-continue-btn {
    width: 100%;
    padding: 0.875rem;
    background: var(--store-bg);
    color: var(--store-primary);
    border: 2px solid var(--store-primary);
    border-radius: var(--store-radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--store-transition);
    text-decoration: none;
    text-align: center;
    display: block;
}

.cart-continue-btn:hover {
    background: var(--store-primary);
    color: white;
}

.view-cart-btn,
.view-product-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--store-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--store-transition);
}

.payment-method-btn {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--store-border);
    background: var(--store-bg);
    border-radius: var(--store-radius);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.payment-method-btn:hover {
    border-color: var(--store-border-dark);
}

.payment-method-btn.active {
    border-color: var(--store-primary);
    background: var(--store-primary-light);
    color: var(--store-primary);
}

/* ========================================
   Product Cards & Listings
   ======================================== */
.product-listing,
.featured-products,
.sale-products,
.category-products {
    margin-bottom: 2rem;
}

.product-grid,
.products-grid {
    display: grid;
    grid-template-columns: repeat(var(--store-grid-columns), 1fr);
    gap: var(--store-grid-gap);
    margin-bottom: 2rem;
}

@media (max-width: 900px) {
    .product-grid,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .product-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
}

.product-card {
    background: var(--store-bg);
    border-radius: var(--store-radius-xl);
    overflow: hidden;
    box-shadow: var(--store-shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--store-shadow-lg);
}

.product-image-link {
    display: block;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--store-bg-tertiary);
}

.product-details,
.product-content {
    padding: 1.5rem;
}

.product-category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--store-bg);
    background: var(--store-primary);
    border-radius: var(--store-radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.product-sale-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--store-bg);
    background: var(--store-danger);
    border-radius: var(--store-radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--store-text-primary);
    margin-bottom: 0.5rem;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-title a:hover {
    color: var(--store-primary);
}

.product-description {
    color: var(--store-text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.product-category {
    color: var(--store-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.product-card .product-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.product-error,
.filter-error,
.shopping-error {
    text-align: center;
    padding: 2rem;
    color: var(--store-text-secondary);
}

.no-products,
.no-products-message {
    text-align: center;
    padding: 3rem;
    color: var(--store-text-secondary);
    font-size: 1.1rem;
}

/* ========================================
   Price Display
   ======================================== */
.product-price-container {
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--store-text-primary);
}

.product-price-original {
    text-decoration: line-through;
    color: var(--store-text-tertiary);
    margin-right: 0.5rem;
}

.product-price-discounted {
    color: var(--store-danger);
    font-weight: bold;
    margin-left: 0.5rem;
}

.product-price-badge {
    display: inline-block;
    background: var(--store-danger);
    color: var(--store-bg);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 600;
    margin-left: 0.5rem;
}

.product-price-savings {
    display: block;
    font-size: 0.85rem;
    color: var(--store-success);
    margin-top: 0.25rem;
}

.product-original-price {
    text-decoration: line-through;
    color: var(--store-text-tertiary);
    margin-right: 0.5rem;
}

.product-discounted-price {
    color: var(--store-danger);
    font-weight: bold;
    font-size: 1.25rem;
}

.discount-badge {
    background: var(--store-danger);
    color: var(--store-bg);
    padding: 0.25rem 0.75rem;
    border-radius: var(--store-radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.product-price-container.price-with-discount .product-price {
    color: var(--store-danger);
}

/* ========================================
   Product Detail Page
   ======================================== */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
    }
}

.product-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-main-image {
    border-radius: var(--store-radius-lg);
    overflow: hidden;
    background: var(--store-bg-tertiary);
}

.main-image {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: var(--store-radius-lg);
}

.product-thumbnails {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.thumbnail {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--store-radius);
    border: 2px solid var(--store-border);
    cursor: pointer;
    transition: border-color 0.2s;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--store-primary);
}

.product-info {
    display: flex;
    flex-direction: column;
}

.product-sku {
    font-size: 0.875rem;
    color: var(--store-text-secondary);
    margin-bottom: 0.5rem;
}

.product-inventory {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.product-inventory.in-stock {
    color: var(--store-success);
}

.product-inventory.low-stock {
    color: var(--store-warning);
}

.product-inventory.out-of-stock {
    color: var(--store-danger);
}

/* ========================================
   Quantity Controls
   ======================================== */
.cart-quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-quantity-input {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid var(--store-border-dark);
    border-radius: var(--store-radius);
    text-align: center;
    font-size: 1rem;
}

.cart-quantity-decrease,
.cart-quantity-increase {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--store-border-dark);
    border-radius: var(--store-radius);
    background: var(--store-bg);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--store-text-primary);
    transition: var(--store-transition);
}

.cart-quantity-decrease:hover,
.cart-quantity-increase:hover {
    background: var(--store-bg-secondary);
}

/* ========================================
   Variant Selectors
   ======================================== */
.product-variants {
    margin-bottom: 1.5rem;
}

.variant-group {
    margin-bottom: 1rem;
}

.variant-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--store-text-primary);
}

.variant-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--store-border-dark);
    border-radius: var(--store-radius);
    background: var(--store-bg);
    font-size: 1rem;
}

/* ========================================
   Cart Page
   ======================================== */
.cart-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

@media (max-width: 768px) {
    .cart-container {
        grid-template-columns: 1fr;
    }
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--store-bg);
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius-xl);
    box-shadow: var(--store-shadow);
    transition: box-shadow 0.3s ease;
}

.cart-item:hover {
    box-shadow: var(--store-shadow-lg);
}

.cart-item-image-wrapper {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: var(--store-radius-lg);
    overflow: hidden;
    background: var(--store-bg-tertiary);
}

.cart-item-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.cart-item-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--store-text-primary);
    margin-bottom: 0.25rem;
}

.cart-item-type {
    color: var(--store-text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.cart-item-variant {
    font-size: 0.85em;
    color: var(--store-text-muted);
    margin-top: 2px;
}

.cart-item-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--store-primary);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cart-item-actions {
    display: flex;
    gap: 0.75rem;
}

/* ========================================
   Cart Summary
   ======================================== */
.cart-summary {
    background: var(--store-bg);
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius-xl);
    padding: 1.5rem;
    box-shadow: var(--store-shadow);
}

.cart-summary h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--store-text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--store-border);
}

.cart-summary-totals {
    margin-bottom: 1.5rem;
}

.cart-summary-subtotal,
.cart-summary-tax,
.cart-summary-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.cart-summary-total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--store-text-primary);
    padding-top: 0.75rem;
    border-top: 2px solid var(--store-border);
    margin-top: 1rem;
}

.cart-summary-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cart-summary-section {
    position: sticky;
    top: 2rem;
}

.cart-summary-card {
    background: var(--store-bg);
    border-radius: var(--store-radius-xl);
    padding: 2rem;
    box-shadow: var(--store-shadow-md);
    margin-bottom: 2rem;
}

.cart-summary-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.cart-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--store-bg);
    border-radius: var(--store-radius-xl);
    border: 1px solid var(--store-border);
}

.cart-error {
    text-align: center;
    padding: 2rem;
    background: var(--store-danger-light);
    border-radius: var(--store-radius-xl);
    color: var(--store-danger);
}

/* ========================================
   Cart Badge (Header)
   ======================================== */
.cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.cart-btn-icon {
    width: 24px;
    height: 24px;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--store-danger);
    color: var(--store-bg);
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--store-danger);
    color: var(--store-bg);
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    padding: 0 4px;
}

/* ========================================
   Checkout Page
   ======================================== */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 900px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    .checkout-grid > :last-child {
        order: -1;
    }
}

.checkout-section {
    background: var(--store-bg);
    padding: 1.5rem;
    border-radius: var(--store-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.checkout-section h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--store-border);
}

.checkout-form .form-group {
    margin-bottom: 1rem;
}

.checkout-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkout-form .form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--store-border-dark);
    border-radius: var(--store-radius);
    font-size: 1rem;
}

.payment-container {
    display: none;
    min-height: 200px;
    position: relative;
}

.payment-container.active {
    display: block;
}

.checkout-actions {
    margin-top: 1.5rem;
}

.checkout-form .checkout-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkout-form .checkout-hidden-group {
    display: none;
    margin-top: 0.5rem;
}

.checkout-form .checkout-submit-btn {
    width: 100%;
    margin-top: 1rem;
}

.checkout-error {
    color: var(--store-danger);
    text-align: center;
    padding: 1rem;
}

/* Checkout order items sidebar */
.checkout-grid .cart-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--store-border);
    box-shadow: none;
    border-radius: 0;
    background: transparent;
}

.checkout-grid .cart-item:hover {
    box-shadow: none;
}

.checkout-grid .cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--store-radius);
}

.checkout-grid .cart-total-row {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--store-border);
}

/* ========================================
   Promo Code
   ======================================== */
.promo-code-section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--store-border);
}

.promo-input-row {
    display: flex;
    gap: 0.5rem;
}

.promo-code-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius);
    text-transform: uppercase;
    font-size: 0.875rem;
}

.apply-promo-btn {
    padding: 0.5rem 1rem;
    background: var(--store-info);
    color: var(--store-bg);
    border: none;
    border-radius: var(--store-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
}

.promo-message {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.promo-applied {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--store-success-light);
    border: 1px solid var(--store-success);
    border-radius: var(--store-radius);
    font-size: 0.875rem;
    color: #065f46;
}

.remove-promo-btn {
    background: none;
    border: none;
    color: var(--store-danger);
    cursor: pointer;
    font-size: 0.875rem;
}

/* ========================================
   Order Totals (Checkout sidebar)
   ======================================== */
.order-totals {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--store-border);
}

.order-totals .order-subtotal,
.order-totals .order-tax,
.order-totals .order-shipping,
.order-totals .order-discount {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.order-totals .order-discount .order-discount-value {
    color: var(--store-success);
}

.order-totals .order-total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.25rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--store-border);
}

/* ========================================
   Subscriptions
   ======================================== */
.subscription-badge {
    display: inline-block;
    background: #f3e8ff;
    color: #6b21a8;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: var(--store-radius);
    margin-left: 0.5rem;
    font-weight: 500;
}

.billing-cycle {
    display: block;
    font-size: 0.75rem;
    color: var(--store-text-secondary);
    margin-top: 0.25rem;
}

.paypal-manual-renewal-notice {
    padding: 1rem;
    background: var(--store-warning-light);
    border-left: 3px solid #ffc107;
    border-radius: var(--store-radius);
    margin-bottom: 1rem;
}

/* ========================================
   Category Filters
   ======================================== */
.store-filters {
    background: var(--store-bg);
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--store-border);
    margin-bottom: 2rem;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--store-primary);
    background: var(--store-bg);
    color: var(--store-primary);
    border-radius: var(--store-radius-full);
    cursor: pointer;
    transition: var(--store-transition);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--store-primary);
    color: var(--store-bg);
}

/* ========================================
   Store Hero / Sections
   ======================================== */
.store-hero {
    background: linear-gradient(135deg, var(--store-primary) 0%, #764ba2 100%);
    color: var(--store-bg);
    padding: 4rem 0;
    text-align: center;
}

.store-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.store-hero p {
    font-size: 1.25rem;
    opacity: 0.9;
}

.store-section {
    padding: 3rem 0;
}

.store-section:nth-child(even) {
    background: var(--store-bg-secondary);
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--store-text-primary);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--store-text-secondary);
    font-size: 1.1rem;
}

/* ========================================
   Breadcrumb (Product Page)
   ======================================== */
.breadcrumb {
    background-color: var(--store-bg-secondary);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--store-border);
}

.breadcrumb-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--store-text-secondary);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--store-primary);
}

.breadcrumb-separator {
    color: var(--store-text-tertiary);
}

.breadcrumb-current {
    color: var(--store-text-primary);
    font-weight: 500;
}

/* ========================================
   Order Confirmation
   ======================================== */
.confirmation-container {
    max-width: 800px;
    margin: 0 auto;
}

.confirmation-header {
    text-align: center;
    padding: 2rem;
    background: var(--store-primary);
    color: var(--store-bg);
    border-radius: var(--store-radius);
    margin-bottom: 2rem;
}

.confirmation-header h1 {
    margin-bottom: 0.5rem;
    color: var(--store-bg);
}

.confirmation-header p {
    color: var(--store-bg);
}

.order-details {
    background: var(--store-bg);
    padding: 2rem;
    border-radius: var(--store-radius);
    box-shadow: var(--store-shadow-md);
    margin-bottom: 2rem;
}

.order-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--store-primary);
    margin-bottom: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--store-border);
}

.detail-label {
    font-weight: 600;
    color: var(--store-text-secondary);
}

.order-items {
    margin: 1.5rem 0;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--store-border);
}

.order-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--store-radius);
}

.order-item-details {
    flex: 1;
}

.order-item-info {
    flex: 1;
}

.order-item-title {
    font-weight: 600;
    color: var(--store-text-primary);
}

.order-item-qty {
    color: var(--store-text-secondary);
    font-size: 0.875rem;
}

.order-item-price {
    font-weight: 600;
    color: var(--store-text-primary);
}

.order-total {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: right;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--store-border-dark);
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--store-radius-full);
    font-weight: 600;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-cancelled {
    background: var(--store-danger-light);
    color: #991b1b;
}

.status-refunded {
    background: #e5e7eb;
    color: #374151;
}

.confirmation-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* ========================================
   Notifications (Cart, Store, Order)
   ======================================== */
.cart-notification,
.store-notification,
.order-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 12px 24px;
    border-radius: var(--store-radius);
    z-index: var(--store-z-notification);
    animation: store-slideIn 0.3s ease;
    font-weight: 500;
}

.cart-notification-success,
.store-notification-success,
.order-notification-success {
    background: var(--store-success);
    color: var(--store-bg);
}

.cart-notification-error,
.store-notification-error,
.order-notification-error {
    background: var(--store-danger);
    color: var(--store-bg);
}

.store-notification-info {
    background: var(--store-info);
    color: var(--store-bg);
}

/* ========================================
   Processing Overlay
   ======================================== */
.store-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: var(--store-z-overlay);
}

.store-overlay .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--store-border);
    border-top-color: var(--store-primary);
    border-radius: 50%;
    animation: store-spin 1s linear infinite;
    margin-bottom: 1rem;
}

.store-overlay .spinner-text {
    color: var(--store-text-secondary);
    font-weight: 500;
}

/* ========================================
   No Payment Methods
   ======================================== */
.no-payment-methods {
    padding: 2rem;
    text-align: center;
    background: var(--store-warning-light);
    border: 1px solid #ffc107;
    border-radius: var(--store-radius-lg);
    margin-bottom: 1rem;
}

.error-message {
    color: var(--store-danger);
    font-size: 0.875rem;
}

/* ========================================
   Loading
   ======================================== */
.loading-spinner {
    text-align: center;
    padding: 3rem;
    color: var(--store-text-secondary);
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius);
    text-decoration: none;
    color: var(--store-text-primary);
}

.pagination a:hover {
    background: var(--store-bg-secondary);
}

.pagination-current {
    background: var(--store-primary);
    color: var(--store-bg);
    border-color: var(--store-primary);
}

.pagination-prev,
.pagination-next {
    font-weight: 600;
}

/* ========================================
   Product Card Transitions (StoreHandler)
   ======================================== */
[data-product-id] {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-item-image-wrapper {
        width: 100%;
        height: 200px;
    }

    .cart-item-image {
        width: 100%;
        height: 200px;
    }

    .cart-item-content {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    .checkout-form .form-row {
        grid-template-columns: 1fr;
    }

    .store-hero h1 {
        font-size: 2rem;
    }

    .store-hero {
        padding: 2rem 0;
    }
}
