body {
    font-family: Arial, sans-serif;
    background: #f3f4f6;
    margin: 0;
    color: #111827;
}

.container {
    max-width: 1100px;
    margin: 30px auto;
    background: #fff;
    padding: 24px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
}

.container.small {
    max-width: 420px;
}

label {
    display: block;
    margin-top: 14px;
    font-weight: bold;
}

input:not([type="radio"]):not([type="checkbox"]),
select,
textarea {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-sizing: border-box;
}

button,
.btn {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 14px;
    background: #111827;
    color: #fff;
    border: 0;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
}

.btn.secondary,
button.secondary {
    background: #fff;
    color: #111827;
    border: 1px solid #d1d5db;
}

.topbar,
.actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.inline-action-form {
    display: inline;
    margin: 0;
}

.inline-action-form button {
    margin-top: 0;
}

.admin-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-nav > .btn,
.admin-nav > .inline-action-form > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 40px;
    min-height: 40px;
    margin: 0 !important;
    padding: 10px 14px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    vertical-align: middle;
    white-space: nowrap;
}

.admin-nav > .inline-action-form {
    display: inline-flex;
    align-items: center;
    align-self: center;
    width: auto;
    height: 40px;
    margin: 0 !important;
    padding: 0;
}

@media (max-width: 720px) {
    .topbar > .admin-nav {
        width: 100%;
        justify-content: flex-start;
    }
}

.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.product-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .04);
    transition: transform .12s ease, box-shadow .12s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
}

.product-card h2 {
    margin-bottom: 6px;
}

.product-card img {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    background: #f9fafb;
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

th,
td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.flash {
    padding: 10px;
    margin: 12px 0;
    border-radius: 8px;
}

.flash.error {
    background: #fee2e2;
    color: #991b1b;
}

.flash.success {
    background: #dcfce7;
    color: #166534;
}

.flash.info {
    background: #dbeafe;
    color: #1e40af;
}

/* ==========================================================
    Shop/Admin
========================================================== */

button.danger,
.btn.danger {
    background: #fff;
    color: #991b1b;
    border: 1px solid #fecaca;
}

button:disabled,
.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.qty-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.qty-form button {
    margin-top: 0;
    padding: 6px 10px;
}

.muted {
    color: #6b7280;
    font-size: 13px;
}

/* ==========================================================
    Toggle switch
========================================================== */

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    transition: .2s;
    border-radius: 26px;
}

.slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: .2s;
    border-radius: 50%;
}

.switch input:checked + .slider {
    background-color: #16a34a;
}

.switch input:checked + .slider::before {
    transform: translateX(22px);
}

/* ==========================================================
    Checkout Delivery
========================================================== */

.delivery-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 18px 0;
}

.delivery-option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all .15s ease;
}

.delivery-option:hover {
    border-color: #2563eb;
    background: #f8fbff;
    box-shadow: 0 3px 10px rgba(37, 99, 235, .08);
}

.delivery-option input[type="radio"] {
    width: 18px;
    min-width: 18px;
    max-width: 18px;
    height: 18px;
    margin: 3px 0 0;
    padding: 0;
    border: 0;
    cursor: pointer;
    accent-color: #2563eb;
}

.delivery-option-text {
    flex: 1;
}

.delivery-option-text strong {
    display: block;
    margin-bottom: 4px;
    font-size: 16px;
    color: #111827;
}

.delivery-option-description {
    display: block;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.45;
}

.delivery-box {
    margin: 16px 0;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fafafa;
}

.delivery-note {
    margin-top: 14px;
    padding: 14px 16px;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.6;
}

.international-note {
    margin: 16px 0;
    padding: 18px;
    border: 1px solid #fbbf24;
    border-left: 5px solid #f59e0b;
    border-radius: 10px;
    background: #fffbeb;
    color: #78350f;
    line-height: 1.6;
}

.international-note h3 {
    margin: 0 0 10px;
    color: #92400e;
}

.international-note a {
    color: #1d4ed8;
    font-weight: bold;
    text-decoration: none;
}

.international-note a:hover {
    text-decoration: underline;
}

.international-mail-button {
    display: inline-block;
    margin-top: 14px;
    padding: 10px 16px;
    border-radius: 8px;
    background: #2563eb;
    color: #fff !important;
    text-decoration: none;
}

.international-mail-button:hover {
    background: #1d4ed8;
}

.submit-disabled-note {
    display: none;
    margin-top: 12px;
    color: #92400e;
    font-size: 14px;
}

.submit-disabled-note.visible {
    display: block;
}

.child-size-select {
    font-size: .85rem;
}

/* ==========================================================
    Product image gallery
========================================================== */

.product-gallery {
    margin-bottom: 14px;
}

.product-card .product-main-image {
    width: 100%;
    height: 260px;
    max-height: 260px;
    object-fit: contain;
    background: #f9fafb;
    border-radius: 10px;
}

.product-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 9px;
    overflow-x: auto;
    padding-bottom: 3px;
}

.product-thumbnail {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    margin: 0;
    padding: 3px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
}

.product-thumbnail.active {
    border: 2px solid #2563eb;
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 5px;
    background: #f9fafb;
}

/* ==========================================================
    Cart totals
========================================================== */

.cart-total {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    margin-top: 16px;
    padding: 16px 18px;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 17px;
}

.cart-total > span {
    font-weight: 700;
}

.cart-total > div {
    text-align: right;
}

.cart-total strong {
    display: block;
    color: #111827;
    font-size: 22px;
}

.remove-item-button {
    background: #fff;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.remove-item-button:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

/* ==========================================================
    Language selector
========================================================== */

.language-switcher {
    position: fixed;
    top: 10px;
    right: 12px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.language-form {
    display: flex;
    margin: 0;
}

.language-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    width: auto;
    height: 24px;
    margin: 0;
    padding: 0 6px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: #374151;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    opacity: .65;
    transition:
        background-color .15s ease,
        border-color .15s ease,
        color .15s ease,
        opacity .15s ease;
}

.language-flag:hover {
    border-color: #d1d5db;
    background: #f3f4f6;
    opacity: 1;
}

.language-flag.active {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
    opacity: 1;
}

.language-flag img {
    width: 18px;
    height: 13px;
    display: block;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 2px;
}

/* ==========================================================
    Responsive
========================================================== */

@media (max-width: 650px) {
    .container {
        margin: 16px 10px;
        padding: 18px;
    }

    .cart-total {
        justify-content: space-between;
        align-items: flex-start;
    }

    .cart-total strong {
        font-size: 19px;
    }

    .language-switcher {
        top: 6px;
        right: 6px;
    }

    .language-flag {
        height: 22px;
        padding: 0 5px;
        font-size: 10px;
    }
}
