/* ─── SHOP INDEX ────────────────────────────────────────────────── */

.shop-empty {
    text-align: center;
    padding: 4rem 0;
    color: #6b7280;
    font-size: 1.1rem;
}

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

.shop-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
}

.shop-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    transform: translateY(-3px);
}

.shop-card__image-link {
    display: block;
    overflow: hidden;
    aspect-ratio: 3/4;
}

.shop-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.shop-card:hover .shop-card__image {
    transform: scale(1.04);
}

.shop-card__image-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    font-size: 3rem;
}

.shop-card__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.shop-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 .5rem;
    color: #111827;
}

.shop-card__title a {
    color: inherit;
    text-decoration: none;
}

.shop-card__title a:hover { color: var(--color-accent, #e67e22); }

.shop-card__desc {
    font-size: .9rem;
    color: #6b7280;
    margin: 0 0 1rem;
    flex: 1;
}

.shop-card__footer {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-top: auto;
}

.shop-card__price {
    font-size: 1.2rem;
    font-weight: 800;
    color: #111827;
}

.shop-card__add-form { display: block; }

.shop-card__add-btn {
    width: 100%;
    justify-content: center;
    padding: .7rem 1rem;
    font-size: .95rem;
}

.shop-card__out-of-stock {
    font-size: .85rem;
    color: #9ca3af;
}

/* ─── PRODUCT DETAIL ─────────────────────────────────────────────── */

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

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

.product-gallery__main {
    border-radius: 8px;
    overflow: hidden;
    /*aspect-ratio: 4/3;*/
    background: #f3f4f6;
}

.product-gallery__main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .2s;
}

.product-gallery__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #d1d5db;
}

.product-gallery__thumbs {
    display: flex;
    gap: .5rem;
    margin-top: .75rem;
    flex-wrap: wrap;
}

.product-gallery__thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: .7;
    transition: opacity .2s, border-color .2s;
}

.product-gallery__thumb:hover,
.product-gallery__thumb.active {
    opacity: 1;
    border-color: var(--color-accent, #e67e22);
}

.product-info__title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 .75rem;
}

.product-info__price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-accent, #e67e22);
    margin-bottom: 1.25rem;
}

.product-info__description {
    color: #374151;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.product-info__qty-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.product-info__qty-row label {
    font-weight: 600;
    color: #374151;
}

.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn {
    background: #f9fafb;
    border: none;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    cursor: pointer;
    color: #374151;
    transition: background .2s;
}

.qty-btn:hover { background: #e5e7eb; }

.qty-input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid #d1d5db;
    border-right: 1px solid #d1d5db;
    height: 36px;
    font-size: 1rem;
    font-family: inherit;
    padding: 0;
}

.qty-input:focus { outline: none; }

.product-info__stock {
    font-size: .85rem;
    color: #6b7280;
}

.product-info__form {
    margin-bottom: 1.5rem;
}

.product-info__out-of-stock {
    font-size: 1rem;
    color: #dc2626;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.product-info__back {
    display: inline-block;
    margin-top: .5rem;
    color: #6b7280;
    font-size: .9rem;
    text-decoration: none;
}

.product-info__back:hover { color: var(--color-accent, #e67e22); }

/* ─── CART ───────────────────────────────────────────────────────── */

.cart-empty {
    text-align: center;
    padding: 5rem 1rem;
    color: #6b7280;
}

.cart-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
    color: #d1d5db;
}

.cart-empty h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: .5rem;
}

.cart-empty p { margin-bottom: 1.5rem; }

.cart-table-wrap {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
}

.cart-table th {
    text-align: left;
    padding: .75rem 1rem;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 700;
    color: #374151;
    white-space: nowrap;
}

.cart-table td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.cart-row__product {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.cart-row__img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.cart-row__img--placeholder {
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    font-size: 1.5rem;
}

.cart-row__product a {
    color: #111827;
    text-decoration: none;
    font-weight: 600;
}

.cart-row__product a:hover { color: var(--color-accent, #e67e22); }

.cart-qty-input {
    width: 60px;
    padding: .4rem .5rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: .9rem;
    text-align: center;
    font-family: inherit;
}

.cart-row__subtotal { font-weight: 600; }

.cart-remove-btn {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1rem;
    cursor: pointer;
    padding: .25rem;
    transition: color .2s;
}

.cart-remove-btn:hover { color: #dc2626; }

.cart-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.cart-summary {
    display: flex;
    justify-content: flex-end;
}

.cart-summary__box {
    width: 100%;
    max-width: 380px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    background: #f9fafb;
}

.cart-summary__box h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: #111827;
}

.cart-summary__row {
    display: flex;
    justify-content: space-between;
    padding: .5rem 0;
    font-size: .95rem;
    color: #374151;
    border-top: 1px solid #e5e7eb;
}

.cart-summary__row--note {
    font-size: .8rem;
    color: #9ca3af;
    font-style: italic;
    border: none;
}

.btn--full { width: 100%; justify-content: center; margin-top: 1.25rem; }

.btn--cta {
    padding: 1rem 2rem;
    font-size: 1rem;
    letter-spacing: .5px;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(232,96,60,.3);
    display: flex;
    align-items: center;
    gap: .6rem;
}

.btn--cta:hover {
    box-shadow: 0 8px 24px rgba(232,96,60,.45);
    transform: translateY(-2px);
}

/* ─── CHECKOUT ───────────────────────────────────────────────────── */

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 900px) {
    .checkout-layout { grid-template-columns: 1fr; }
    .checkout-summary-col { order: -1; }
}

.checkout-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.checkout-section:last-child { border-bottom: none; margin-bottom: 0; }

.checkout-section__title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1.25rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

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

@media (max-width: 600px) {
    .checkout-row { grid-template-columns: 1fr; }
}

.checkout-field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-bottom: 1rem;
}

.checkout-field label {
    font-size: .875rem;
    font-weight: 600;
    color: #374151;
}

.checkout-field--sm { max-width: 160px; }

.checkout-input {
    padding: .65rem .9rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: .95rem;
    font-family: inherit;
    color: #111827;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
    box-sizing: border-box;
}

.checkout-input:focus {
    outline: none;
    border-color: var(--color-accent, #e67e22);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, .15);
}

.checkout-field ul.errors,
.checkout-field .form-error-message {
    color: #dc2626;
    font-size: .8rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.delivery-options {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.delivery-option {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .9rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.delivery-option:has(input:checked) {
    border-color: var(--color-accent, #e67e22);
    background: #fff8f3;
}

.delivery-option input[type="radio"] {
    margin-top: 3px;
    accent-color: var(--color-accent, #e67e22);
    flex-shrink: 0;
}

.delivery-option__info {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.delivery-option__name {
    font-weight: 600;
    color: #111827;
    font-size: .95rem;
}

.delivery-option__price {
    display: inline;
    font-weight: 700;
    color: var(--color-accent, #e67e22);
    font-size: .9rem;
}

.delivery-option__days {
    font-size: .8rem;
    color: #6b7280;
}

/* Payment method selector */
.payment-options {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.payment-option:has(input:checked) {
    border-color: var(--color-accent, #e67e22);
    background: #fff8f3;
}

.payment-option input[type="radio"] {
    accent-color: var(--color-accent, #e67e22);
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
}

.payment-option__body {
    display: flex;
    align-items: center;
    gap: .85rem;
    flex: 1;
}

.payment-option__icon {
    font-size: 1.4rem;
    color: var(--color-accent, #e67e22);
    width: 2rem;
    text-align: center;
    flex-shrink: 0;
}

.payment-option__info {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    flex: 1;
}

.payment-option__name {
    font-weight: 700;
    color: #111827;
    font-size: .95rem;
}

.payment-option__desc {
    font-size: .82rem;
    color: #6b7280;
}

.payment-option__logo {
    height: 28px;
    width: auto;
    opacity: .85;
    flex-shrink: 0;
}

/* Checkout summary sidebar */
.checkout-summary {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    background: #f9fafb;
    position: sticky;
    top: 100px;
}

.checkout-summary__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid #e5e7eb;
}

.checkout-summary__items {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.checkout-summary__item {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    padding: .4rem 0;
    font-size: .9rem;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}

.checkout-summary__item-name em {
    font-style: normal;
    color: #9ca3af;
    margin-left: .25rem;
}

.checkout-summary__item-price { font-weight: 600; white-space: nowrap; }

.checkout-summary__line {
    display: flex;
    justify-content: space-between;
    padding: .5rem 0;
    font-size: .9rem;
    color: #374151;
}

.checkout-summary__line--delivery { color: #6b7280; }

.checkout-summary__total {
    display: flex;
    justify-content: space-between;
    padding: .75rem 0;
    font-size: 1.1rem;
    border-top: 2px solid #e5e7eb;
    margin-top: .25rem;
    margin-bottom: .25rem;
}

.checkout-back {
    display: block;
    text-align: center;
    margin-top: 1rem;
    font-size: .85rem;
    color: #6b7280;
    text-decoration: none;
}

.checkout-back:hover { color: var(--color-accent, #e67e22); }

/* ─── ORDER SUCCESS ──────────────────────────────────────────────── */

.order-success {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.order-success__icon {
    font-size: 4rem;
    color: #16a34a;
    margin-bottom: 1rem;
}

.order-success__icon--ok   { color: #16a34a; }
.order-success__icon--fail { color: #e74c3c; }
.order-success__icon--pending { color: #f39c12; }

.order-success h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 .5rem;
}

.order-success__email {
    color: #6b7280;
    margin-bottom: 2rem;
}

.order-success__details {
    text-align: left;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.order-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.order-detail-grid h4 {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #9ca3af;
    margin: 0 0 .5rem;
}

.order-detail-grid p {
    font-size: .9rem;
    color: #374151;
    margin: 0;
    line-height: 1.6;
}

.order-success__items {
    text-align: left;
    margin-bottom: 1.5rem;
}

.order-success__items h4 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: #111827;
}

.order-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.order-items-table th,
.order-items-table td {
    padding: .65rem .75rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.order-items-table th {
    font-weight: 700;
    color: #374151;
    background: #f9fafb;
}

.order-items-table tfoot td {
    padding-top: .75rem;
    color: #374151;
}

.order-items-table__total td {
    border-top: 2px solid #e5e7eb;
    font-size: 1rem;
}

.order-success__notes {
    text-align: left;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: .9rem;
}

.order-success__notes h4 {
    margin: 0 0 .25rem;
    font-weight: 700;
}

.order-success__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Payment redirect page */
.payment-redirect {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 1rem;
}
.payment-redirect__spinner {
    font-size: 3rem;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}
.payment-redirect__msg {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.payment-redirect__sub {
    color: #6b7280;
    margin-bottom: 2rem;
}
.payment-redirect form {
    display: flex;
    justify-content: center;
}

/* --- Size variant buttons --- */
.product-variants { margin-top: 1.5rem; }
.product-variants__label { font-weight: 600; margin-bottom: 0.75rem; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; }
.product-variants__sizes { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }

.size-btn {
    position: relative;
    min-width: 3rem;
    padding: 0.4rem 0.75rem;
    border: 2px solid #ccc;
    background: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.size-btn:hover:not(:disabled) { border-color: var(--color-primary, #2c3e6b); }
.size-btn--active { border-color: var(--color-primary, #2c3e6b); background: var(--color-primary, #2c3e6b); color: #fff; }
.size-btn--out { opacity: 0.45; cursor: not-allowed; text-decoration: line-through; }

.cart-row__size { display: block; font-size: 0.8rem; color: #666; margin-top: 2px; }
.checkout-summary__size { font-style: normal; color: #666; }

/* ── Attribute variant buttons ─────────────────────────── */
.product-variants__group { margin-bottom: 1.25rem; }
.product-variants__label {
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #555;
    margin-bottom: 0.5rem;
}
.product-variants__options { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.attr-btn {
    min-width: 3rem;
    padding: 0.4rem 0.9rem;
    border: 2px solid #d0d0d0;
    background: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    color: #333;
}
.attr-btn:hover { border-color: var(--color-primary, #2c3e6b); }
.attr-btn--active {
    border-color: var(--color-primary, #2c3e6b);
    background: var(--color-primary, #2c3e6b);
    color: #fff;
}

.product-info__stock--hint { color: #888; font-style: italic; font-size: 0.875rem; }
.product-info__stock--out  { color: #e74c3c; font-weight: 600; }

.cart-row__variant { display: block; font-size: 0.8rem; color: #666; margin-top: 2px; }
.checkout-item__variant { display: block; font-size: 0.8rem; color: #888; font-style: normal; }
