/* ================================================
   HEALTHY EMPIRE - Main Stylesheet (Arabic RTL)
   ================================================ */

/* Google Fonts - Tajawal */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;

    --text-color: #1f2937;
    --text-muted: #6b7280;
    --text-light: #9ca3af;

    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --bg-dark: #111827;

    --border-color: #e5e7eb;
    --border-radius: 8px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --container-width: 1200px;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    direction: rtl;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    direction: rtl;
    text-align: right;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ================================================
   HEADER
   ================================================ */
.site-header {
    background: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
}

.logo {
    text-decoration: none;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.main-nav {
    display: flex;
    gap: 25px;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Cart Button */
.cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    padding: 8px;
    margin-right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
}

.cart-btn svg {
    transition: transform 0.2s;
}

.cart-btn:hover svg {
    transform: scale(1.1);
    color: var(--primary-color);
}

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

/* Cart Drawer Overlay */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.cart-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Cart Drawer / Side Sheet */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: #fff;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.cart-drawer.show {
    right: 0;
}

@media (max-width: 480px) {
    .cart-drawer {
        max-width: 100%;
    }
}

.cart-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.cart-drawer-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #1f2937;
}

.cart-close-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    border-radius: 8px;
    transition: all 0.2s;
}

.cart-close-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Cart Loading */
.cart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #6b7280;
    gap: 16px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.cart-error {
    text-align: center;
    padding: 40px 20px;
    color: var(--danger-color);
}

/* Cart Drawer Items */
.drawer-cart-items {
    padding: 0;
}

.drawer-cart-item {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
}

.drawer-item-image {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
}

.drawer-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.drawer-item-image .placeholder {
    width: 100%;
    height: 100%;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
}

.drawer-item-details {
    flex: 1;
    min-width: 0;
}

.drawer-item-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
    display: block;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drawer-item-name:hover {
    color: var(--primary-color);
}

.drawer-item-pack {
    font-size: 0.8rem;
    color: #6b7280;
    display: block;
    margin-bottom: 8px;
}

.drawer-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.drawer-qty-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.drawer-qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
}

.drawer-qty-btn:hover {
    background: #f3f4f6;
}

.drawer-qty-input {
    width: 40px;
    height: 28px;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
}

.drawer-item-price {
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

.drawer-item-remove {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 6px;
    flex-shrink: 0;
    align-self: flex-start;
}

.drawer-item-remove:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* Cart Drawer Footer */
.drawer-cart-footer {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.drawer-subtotal {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.drawer-subtotal-label {
    color: #6b7280;
}

.drawer-subtotal-value {
    font-weight: 700;
    color: #1f2937;
}

.drawer-checkout-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.drawer-checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    text-decoration: none;
    color: #fff;
}

/* Empty Cart in Drawer */
.drawer-empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.drawer-empty-cart svg {
    color: #d1d5db;
    margin-bottom: 16px;
}

.drawer-empty-cart h3 {
    color: #374151;
    margin-bottom: 8px;
}

.drawer-empty-cart p {
    color: #9ca3af;
    margin-bottom: 20px;
}

.drawer-browse-btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
}

.drawer-browse-btn:hover {
    text-decoration: none;
    color: #fff;
}

/* Confirm Dialog */
.confirm-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.confirm-dialog-overlay.show {
    opacity: 1;
    visibility: visible;
}

.confirm-dialog {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.2s;
}

.confirm-dialog-overlay.show .confirm-dialog {
    transform: scale(1);
}

.confirm-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: #fef2f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
}

.confirm-dialog h3 {
    margin: 0 0 8px;
    color: #1f2937;
    font-size: 1.25rem;
}

.confirm-dialog p {
    margin: 0 0 24px;
    color: #6b7280;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
}

.btn-confirm-cancel,
.btn-confirm-delete {
    flex: 1;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-confirm-cancel {
    background: #f3f4f6;
    color: #374151;
}

.btn-confirm-cancel:hover {
    background: #e5e7eb;
}

.btn-confirm-delete {
    background: #dc2626;
    color: #fff;
}

.btn-confirm-delete:hover {
    background: #b91c1c;
}

/* Cart Loading Overlay */
.cart-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.cart-loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.cart-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.cart-loading-spinner svg {
    color: var(--primary-color);
    animation: cartBounce 0.6s ease-in-out infinite;
}

@keyframes cartBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

@media (max-width: 480px) {
    .toast-container {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #1f2937;
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    transform: translateX(-120%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toast-success svg {
    color: #fff;
}

.toast-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.toast-error svg {
    color: #fff;
}

.toast span {
    font-weight: 500;
    font-size: 0.95rem;
}

/* ================================================
   MAIN CONTENT
   ================================================ */
.main-content {
    flex: 1;
}

/* ================================================
   BUTTONS
   ================================================ */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 500;
    font-family: var(--font-family);
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

.btn-danger {
    background: var(--danger-color);
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ================================================
   HERO SECTION
   ================================================ */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 800;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* ================================================
   PRODUCTS GRID
   ================================================ */
.featured-products,
.products-section {
    padding: 60px 0;
}

.section-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-color);
    font-weight: 700;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bg-light);
}

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

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    color: var(--text-muted);
}

.placeholder-image.large {
    min-height: 400px;
}

.product-info {
    padding: 20px;
    text-align: right;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.product-price .price-value {
    font-size: 1.25rem;
}

.product-price .price-currency {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-right: 4px;
}

.product-price.unavailable {
    color: #f59e0b;
    font-size: 0.9rem;
    font-weight: 500;
}

.packs-info {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Product Packs List in Cards */
.product-packs-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.pack-item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.pack-item-card.default {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #93c5fd;
}

.pack-item-card .pack-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
}

.pack-item-card .pack-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
}

.pack-item-card.default .pack-name {
    color: #1d4ed8;
}

.stock-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 20px;
}

.stock-badge.in-stock {
    background: #d1fae5;
    color: #065f46;
}

.stock-badge.out-of-stock {
    background: #fee2e2;
    color: #991b1b;
}

/* ================================================
   PRODUCT DETAIL PAGE
   ================================================ */
.product-detail {
    padding: 40px 0;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.product-main-image {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.product-title {
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.product-price-box {
    margin-bottom: 20px;
}

.product-price-box .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-price-box .currency {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-right: 5px;
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    font-weight: 500;
}

.stock-status.in-stock {
    color: var(--secondary-color);
}

.stock-status.out-of-stock {
    color: var(--danger-color);
}

.product-description {
    margin-bottom: 30px;
}

.product-description h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.product-description p {
    color: var(--text-muted);
    line-height: 1.9;
}

.buy-form {
    background: var(--bg-light);
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.quantity-selector label {
    font-weight: 500;
}

.qty-controls {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-color);
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: var(--bg-light);
}

.qty-controls input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-family);
}

.total-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.total-label {
    color: var(--text-muted);
}

.total-amount {
    font-weight: 700;
    color: var(--primary-color);
}

.buy-now-btn {
    font-size: 1.1rem;
}

.share-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.share-label {
    color: var(--text-muted);
}

.share-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.share-btn.facebook {
    background: #1877f2;
    color: #fff;
}

.share-btn.whatsapp {
    background: #25d366;
    color: #fff;
}

/* ================================================
   CHECKOUT PAGE
   ================================================ */
.checkout-section {
    padding: 40px 0;
}

.checkout-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    font-weight: 700;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

.checkout-form {
    background: var(--bg-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.checkout-form h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    font-family: var(--font-family);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color 0.2s;
    direction: rtl;
    text-align: right;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.order-summary-card {
    background: var(--bg-color);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.order-summary-card h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.summary-product {
    display: flex;
    gap: 15px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.summary-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.summary-product-info h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.summary-qty {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.free-shipping {
    color: var(--secondary-color);
    font-weight: 500;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 2px solid var(--border-color);
    font-size: 1.2rem;
    font-weight: 700;
}

.total-price {
    color: var(--primary-color);
}

.payment-notice {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.payment-icons span {
    padding: 5px 10px;
    background: var(--bg-light);
    border-radius: 4px;
    font-size: 0.8rem;
}

/* ================================================
   RESULT PAGES (Success/Failed/Pending)
   ================================================ */
.result-section {
    padding: 60px 0;
}

.result-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-color);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 25px;
}

.result-icon.success {
    background: #d1fae5;
    color: #065f46;
}

.result-icon.error {
    background: #fee2e2;
    color: #991b1b;
}

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

.result-card h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.result-message {
    color: var(--text-muted);
    margin-bottom: 25px;
}

.order-details {
    text-align: right;
    background: var(--bg-light);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
}

.order-details h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.details-table {
    width: 100%;
}

.details-table td {
    padding: 8px 0;
}

.details-table td:first-child {
    color: var(--text-muted);
    width: 40%;
}

.next-steps {
    text-align: right;
    margin-bottom: 25px;
}

.next-steps h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.next-steps ul {
    padding-right: 20px;
    padding-left: 0;
    color: var(--text-muted);
    list-style-position: inside;
}

.next-steps li {
    margin-bottom: 8px;
}

.result-actions {
    margin-top: 25px;
}

.help-section {
    text-align: right;
    background: var(--bg-light);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
}

.help-section h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.help-section ul {
    padding-right: 20px;
    padding-left: 0;
    color: var(--text-muted);
    margin-bottom: 10px;
    list-style-position: inside;
}

.error-code {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ================================================
   ERROR PAGE
   ================================================ */
.error-section {
    padding: 80px 0;
    text-align: center;
}

.error-card {
    max-width: 500px;
    margin: 0 auto;
}

.error-code-display {
    font-size: 5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.error-message {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.error-details {
    text-align: right;
    background: var(--bg-light);
    padding: 15px;
    border-radius: var(--border-radius);
    overflow-x: auto;
    font-size: 0.85rem;
    margin-bottom: 30px;
}

/* ================================================
   ALERTS
   ================================================ */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ================================================
   PAGINATION
   ================================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.page-link {
    padding: 10px 20px;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    font-weight: 500;
}

.page-link:hover {
    text-decoration: none;
    background: var(--primary-color);
    color: #fff;
}

.page-info {
    color: var(--text-muted);
}

/* ================================================
   FOOTER
   ================================================ */
.site-footer {
    background: var(--bg-dark);
    color: #fff;
    padding: 50px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo-text {
    color: #fff;
    font-size: 1.3rem;
}

.footer-brand p {
    color: var(--text-light);
    margin-top: 10px;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-links a {
    display: block;
    color: var(--text-light);
    margin-bottom: 8px;
}

.footer-links a:hover {
    color: #fff;
}

.footer-contact p {
    color: var(--text-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ================================================
   PAGE HEADER
   ================================================ */
.page-header {
    background: var(--primary-color);
    color: #fff;
    padding: 40px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.page-header p {
    opacity: 0.9;
}

/* ================================================
   EMPTY STATE
   ================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 992px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

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

    .order-summary-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 15px;
    }

    .hero {
        padding: 50px 0;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .product-card {
        margin: 0 5px;
    }

    .checkout-form,
    .order-summary-card,
    .result-card {
        padding: 20px;
    }

    .quantity-selector {
        flex-direction: column;
        align-items: flex-start;
    }

    .share-section {
        flex-wrap: wrap;
    }
}
