:root {
    /* --- CONSOLIDATED POLISHED LIGHT MODE --- */
    --primary-color: #f57224;
    --primary-dark: #d45703;
    --accent-color: #fe724c;
    --brand-start: #f57224;
    --brand-end: #ff1744;

    --ink: #101114;
    --ink-light: #555;
    --ink-weak: #888;

    /* Light mode background color softened for a lighter appearance */
    --background-color: #f5f5f5;
    --surface-bg: var(--background-color);
    --card-background: #ffffff;
    --card-bg: var(--card-background);

    --border-color: #e0e0e0;
    --border: var(--border-color);

    --shadow-color: rgba(245, 114, 36, 0.1);
    --shadow: 0 8px 32px var(--shadow-color);

    --success-color: #28a745;
    --badge-green: #28a745;
    --badge-green-light: #e8f5e9;
    --hot-color: #ff3a5e;
    --badge-red: #ff3a5e;
    --flash-color: #ffc107;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-pill: 999px;
    --radius: 16px; /* Default radius */
}

html, body {
    background-color: var(--background-color);
    color: var(--ink);
    font-family: 'Inter', 'Poppins', 'Segoe UI', Arial, sans-serif;
    margin: 0;
    overflow-y: auto;
}

/* =================================================================== */
/* ============== POLISHED CHECKOUT PAGE STYLES =================== */
/* =================================================================== */

/* --- Base Styles & Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.checkout-container {
    max-width: 1100px;
    margin: 24px auto 80px;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 32px;
    align-items: flex-start;
    animation: fadeIn 0.6s ease-out forwards;
    padding: 0 16px; /* Added for mobile padding */
}

/* --- Main Checkout Content (Left Column) --- */
.checkout-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.checkout-card {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    padding: 28px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px var(--shadow-color);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.card-header .icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.card-header .title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--ink-light);
}

.form-group input {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(245, 114, 36, 0.2);
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-option {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

/* Binance payment details */
.binance-details li span {
    overflow-wrap: anywhere;
    word-break: break-all;
}

.copyable {
    cursor: pointer;
    user-select: all;
    position: relative;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.copyable.copied {
    background-color: var(--badge-green-light);
}

.copyable.copied::after {
    content: 'Copied!';
    position: absolute;
    top: -28px; /* Position it above the element */
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: var(--badge-green);
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 10;
    animation: fadeIn 0.3s;
}


@media (min-width: 600px) {
    .payment-methods {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

.payment-option input[type="radio"] {
    accent-color: var(--primary-color);
    width: 18px;
    height: 18px;
}

.payment-option:has(input:checked), .payment-option:hover {
    border-color: var(--primary-color);
    background-color: #fff7f5;
}

.payment-logos {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

.payment-logos img {
    height: 24px;
}

/* --- Order Summary (Right Column) --- */
.order-summary {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    padding: 28px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px var(--shadow-color);
    position: sticky;
    top: 24px;
}

.summary-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 24px 0;
    text-align: center;
}

.summary-items {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 24px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.item-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: var(--radius-md);
    background-color: #f9f9f9;
    border: 1px solid var(--border-color);
}

.item-details { flex-grow: 1; }
.item-title { font-weight: 600; margin: 0 0 4px 0; }
.item-price { color: var(--ink-light); }
.item-total { font-weight: 600; }

.summary-total {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
}

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

.place-order-btn {
    width: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.place-order-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(245, 114, 36, 0.3);
}

.place-order-btn:active {
    transform: scale(0.98);
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

.place-order-btn.processing .loader { display: block; }
.place-order-btn.processing span { display: none; }

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

/* --- Checkout Responsive Design --- */
@media (max-width: 992px) {
    .checkout-container {
        grid-template-columns: 1fr;
    }
    .order-summary {
        position: static;
        margin-top: 24px;
    }
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .checkout-card, .order-summary {
        padding: 20px;
    }
    .payment-option {
        flex-direction: column;
        align-items: flex-start;
    }
    .payment-logos {
        margin-left: 0;
        margin-top: 10px;
    }
    /* Fix for footer on mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: left;
    }
    .footer-col h3::after {
        left: 0;
        transform: none;
    }
}

/* =================================================================== */
/* ============= POLISHED SKELETON LOADER STYLES =================== */
/* =================================================================== */

/* --- Product Details Page Skeletons --- */

/* Overriding some base skeleton styles for specific contexts */
#product-image-skeleton {
    border-radius: var(--radius-lg);
    width: 100%;
    aspect-ratio: 4 / 3;
}

.thumbnail-strip .skeleton {
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
}

.product-info .skeleton#product-title {
    height: 2.2rem; /* Matches font size */
    width: 70%;
    margin-bottom: 12px;
}

.product-info .skeleton#product-price {
    height: 2.5rem; /* Matches font size */
    width: 120px;
}

.product-info .skeleton#original-price {
    height: 1.2rem; /* Matches font size */
    width: 80px;
    margin-left: 12px;
}

.product-info .skeleton#product-short-description {
    height: 80px;
    width: 90%;
}

/* --- Related Products Skeletons --- */
.related-products-grid .product-card.skeleton {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.related-products-grid .product-card.skeleton .card-image-container {
    background-color: #e2e8f0; /* Use the same as .skeleton bg */
    border-radius: var(--radius-md);
}

.related-products-grid .product-card.skeleton .card-content {
    padding-top: 16px;
}

.related-products-grid .product-card.skeleton .skeleton {
    background-color: #e2e8f0; /* Use the same as .skeleton bg */
}

/* =================================================================== */
/* ============== 1. POLISHED FOOTER STYLES ========================== */
/* =================================================================== */

.site-footer {
    background-color: var(--card-background);
    color: var(--ink-light);
    padding: 50px 24px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    box-shadow: none;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0 0 20px 0;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a {
    color: var(--ink-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-col ul a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 16px;
    margin-top: 15px;
}

.social-links a {
    color: var(--primary-color);
    font-size: 1.6rem;
    transition: transform 0.2s, color 0.2s;
}

.social-links a:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.payment-methods-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.payment-methods-logos img {
    height: 28px;
    opacity: 0.8;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    border-top: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: #999;
    flex-wrap: wrap;
    gap: 16px;
}

.theme-toggle { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.theme-toggle .switch { position: relative; display: inline-block; width: 50px; height: 24px; }
.theme-toggle .switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.theme-toggle .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.theme-toggle .slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; }
.theme-toggle input:checked + .slider { background-color: var(--primary-color); }
.theme-toggle input:checked + .slider:before { transform: translateX(26px); }

/* Remove focus outline and tap highlight on mobile */
.theme-toggle .switch input:focus + .slider { outline: none; box-shadow: none; }
.theme-toggle .slider { -webkit-tap-highlight-color: transparent; }

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
}
