/* ------------------------------------------------------------
   Isola Asteria – Negozio online
   Variabili e componenti condivisi in site.css
------------------------------------------------------------ */

.shop-page-header { background-image: url(/front/images/shop-banner-1.jpg); }

.shop-main { background: #fff; }

.shop-section { padding: 80px 0 100px; }

/* Pagine senza banner (scheda prodotto, conferma ordine): header pieno */
.shop-no-banner header.main-header { background: linear-gradient(135deg, #1a1410 0%, #463828 100%); }
.shop-no-banner .shop-main { padding-top: 96px; }
.shop-no-banner .shop-section { padding-top: 50px; }

.shop-main .breadcrumb { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 0; }
.shop-main .breadcrumb a { color: var(--accent-dark); }
.shop-main .breadcrumb .active { color: var(--text-color); }

/* ---------- Barra filtri ---------- */
.shop-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 26px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--divider-color);
}

.shop-categories { display: flex; flex-wrap: wrap; gap: 8px; }

.shop-chip {
    display: inline-block;
    padding: 10px 22px;
    border: 1px solid var(--divider-color);
    border-radius: 30px;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 15px;
    line-height: 1.2;
    background: #fff;
    transition: all .2s;
}

.shop-chip:hover { border-color: var(--primary-color); color: var(--primary-color); }

.shop-chip.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.shop-filters { display: flex; gap: 10px; align-items: center; }

.shop-search { position: relative; }

.shop-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-dark);
    font-size: 14px;
    pointer-events: none;
}

.shop-filters input,
.shop-filters select,
.shop-input {
    border: 1px solid var(--divider-color);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 15px;
    line-height: 1.3;
    color: var(--primary-color);
    background: #fff;
    width: 100%;
    transition: border-color .2s, box-shadow .2s;
}

.shop-filters input { width: 240px; border-radius: 30px; padding-left: 42px; }

.shop-filters select {
    width: auto;
    border-radius: 30px;
    padding-right: 38px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23091334' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

select.shop-input {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23091334' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.shop-input:focus,
.shop-filters input:focus,
.shop-filters select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(184, 164, 126, .22);
}

.shop-result-count { font-size: 14px; margin-bottom: 26px; }

/* ---------- Card prodotto ---------- */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--divider-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.product-card .pc-image {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fff;
    border-bottom: 1px solid var(--divider-color);
}

.product-card .pc-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    padding: 0;
    display: block;
    transition: transform .5s ease;
}

.product-card:hover .pc-image img { transform: scale(1.05); }

.pc-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .1em;
    line-height: 1.3;
    text-transform: uppercase;
    background: #9b2c22;
    color: #fff;
}

.pc-badge.soldout { background: #5b6072; }
.pc-badge.last { background: var(--primary-color); color: var(--accent-color); }

.product-card.is-soldout .pc-image img { opacity: .55; filter: grayscale(.4); }

.product-card .pc-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 20px 22px;
    text-align: center;
}

.pc-category {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .2em;
    color: var(--accent-dark);
    font-weight: 600;
    margin-bottom: 8px;
}

.pc-name {
    font-family: var(--display-font);
    font-size: 23px;
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 12px;
}

.pc-name a { color: var(--primary-color); transition: color .2s; }
.pc-name a:hover { color: var(--accent-dark); }

.pc-price {
    margin-top: auto;
    margin-bottom: 16px;
    font-size: 19px;
    font-weight: 700;
    color: var(--primary-color);
}

.price-old {
    font-size: .78em;
    font-weight: 500;
    color: #9b2c22;
    text-decoration: line-through;
    margin-right: 8px;
}

/* ---------- Pulsanti negozio ---------- */
.btn-shop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    border: 1px solid var(--primary-color);
    border-radius: 30px;
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.2;
    transition: background .25s, color .25s, border-color .25s, transform .15s;
    cursor: pointer;
}

.btn-shop:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--primary-color);
}

.btn-shop:active { transform: scale(.98); }

.btn-shop:disabled,
.btn-shop.is-loading {
    background: #c9ccd6;
    border-color: #c9ccd6;
    color: #fff;
    cursor: not-allowed;
}

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

.product-card .btn-shop { background: transparent; color: var(--primary-color); padding: 12px 16px; font-size: 14px; }
.product-card .btn-shop:hover { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.product-card .btn-shop:disabled { background: #f1f1f4; border-color: #f1f1f4; color: #8a8fa0; }

.shop-empty { text-align: center; padding: 70px 20px; }

.shop-empty i {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--ivory);
    color: var(--accent-dark);
    font-size: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
}

.shop-empty h3 { font-family: var(--display-font); font-size: 34px; font-weight: 600; margin-bottom: 10px; }

/* Paginazione */
.shop-pagination nav > div:first-child { display: none; }
.shop-pagination nav > div:last-child { display: flex !important; flex-direction: column; align-items: center; gap: 12px; }
.shop-pagination .pagination { justify-content: center; gap: 6px; margin: 0; }
.shop-pagination .page-link { border-radius: 50% !important; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; color: var(--primary-color); border-color: var(--divider-color); }
.shop-pagination .page-item.active .page-link { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.shop-pagination p { font-size: 13px; margin: 0; }

/* ---------- Scheda prodotto ---------- */
.product-gallery-main {
    border: 1px solid var(--divider-color);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    aspect-ratio: 1 / 1;
}

.product-gallery-main img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; padding: 0; }

.product-thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

.product-thumbs button {
    width: 78px;
    height: 78px;
    padding: 4px;
    border: 1px solid var(--divider-color);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    transition: border-color .2s;
}

.product-thumbs button.active,
.product-thumbs button:hover { border-color: var(--primary-color); }

.product-thumbs img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }

.product-info { position: sticky; top: 110px; }

.product-info h1 {
    font-family: var(--display-font);
    font-size: 48px;
    font-weight: 600;
    line-height: 1.05;
    margin-bottom: 18px;
}

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

.product-vat { font-size: 13px; margin-bottom: 22px; }

.product-stock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

.product-stock.in { color: #1c6b41; background: #e8f4ec; }
.product-stock.low { color: #8a5a06; background: #fbf1dc; }
.product-stock.out { color: #9b2c22; background: #fbe9e7; }

.product-note { padding: 14px 18px; border-left: 2px solid var(--accent-color); background: var(--ivory); border-radius: 0 10px 10px 0; margin-bottom: 24px; color: var(--primary-color); }

.product-buy { display: flex; gap: 12px; margin-bottom: 28px; }
.product-buy .btn-shop { width: auto; flex: 1; padding: 16px 20px; }

.qty-input {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--divider-color);
    border-radius: 30px;
    overflow: hidden;
    background: #fff;
}

.qty-input button {
    width: 42px;
    height: 50px;
    border: none;
    background: none;
    color: var(--primary-color);
    font-size: 18px;
    cursor: pointer;
    transition: background .2s;
}

.qty-input button:hover { background: var(--ivory); }

.qty-input input {
    width: 40px;
    border: none;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    background: transparent;
    -moz-appearance: textfield;
}

.qty-input input::-webkit-outer-spin-button,
.qty-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.qty-input.sm button { height: 38px; width: 34px; font-size: 16px; }

.product-perks {
    list-style: none;
    padding: 22px 0 0;
    margin: 0;
    border-top: 1px solid var(--divider-color);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}

.product-perks li { display: flex; gap: 10px; align-items: center; font-size: 14px; line-height: 1.35; }
.product-perks i { width: 20px; color: var(--accent-dark); text-align: center; }

.product-description { margin-top: 70px; padding-top: 50px; border-top: 1px solid var(--divider-color); max-width: 820px; }
.product-description p, .product-description li { line-height: 1.8; }

.shop-subtitle { font-family: var(--display-font); font-size: 36px; font-weight: 600; margin-bottom: 26px; }

/* ---------- Passaggi del checkout ---------- */
.checkout-steps {
    display: flex;
    justify-content: center;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0 0 50px;
    counter-reset: step;
}

.checkout-steps li {
    position: relative;
    flex: 1;
    max-width: 220px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #9aa0b3;
    counter-increment: step;
}

.checkout-steps li::before {
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin: 0 auto 10px;
    border-radius: 50%;
    border: 1px solid #c9ccd6;
    background: #fff;
    color: #9aa0b3;
    font-size: 15px;
    position: relative;
    z-index: 1;
}

.checkout-steps li::after {
    content: '';
    position: absolute;
    top: 19px;
    left: calc(-50% + 19px);
    right: calc(50% + 19px);
    height: 1px;
    background: #c9ccd6;
}

.checkout-steps li:first-child::after { display: none; }

.checkout-steps li.done,
.checkout-steps li.current { color: var(--primary-color); }

.checkout-steps li.done::before { content: '✓'; background: var(--accent-color); border-color: var(--accent-color); color: var(--primary-color); }
.checkout-steps li.current::before { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.checkout-steps li.done::after,
.checkout-steps li.current::after { background: var(--accent-color); }

/* ---------- Carrello ---------- */
.cart-table { width: 100%; border-collapse: collapse; }

.cart-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--text-color);
    font-weight: 600;
    padding: 0 10px 14px;
    border-bottom: 1px solid var(--divider-color);
}

.cart-table td { padding: 20px 10px; border-bottom: 1px solid var(--divider-color); vertical-align: middle; }

.cart-product { display: flex; align-items: center; gap: 16px; }

.cart-product img {
    width: 84px;
    height: 84px;
    object-fit: contain;
    padding: 6px;
    border: 1px solid var(--divider-color);
    border-radius: 10px;
    background: #fff;
    flex-shrink: 0;
}

.cart-product a { font-family: var(--display-font); font-size: 21px; line-height: 1.15; color: var(--primary-color); font-weight: 600; }
.cart-product a:hover { color: var(--accent-dark); }

.cart-remove {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: none;
    color: #9aa0b3;
    cursor: pointer;
    font-size: 15px;
    transition: background .2s, color .2s;
}

.cart-remove:hover { color: #9b2c22; background: #fbe9e7; }

/* ---------- Riepilogo ---------- */
.summary-box {
    background: var(--ivory);
    border-radius: var(--radius);
    padding: 30px;
    position: sticky;
    top: 110px;
}

.summary-box h3,
.checkout-card h3 { font-family: var(--display-font); font-size: 28px; font-weight: 600; margin-bottom: 20px; }

.summary-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; font-size: 15px; }

.summary-row.total {
    border-top: 1px solid var(--divider-color);
    margin-top: 10px;
    padding-top: 16px;
    font-size: 21px;
    font-weight: 700;
    color: var(--primary-color);
}

.summary-item { display: flex; gap: 14px; align-items: center; padding: 9px 0; font-size: 14px; line-height: 1.35; }

.summary-item img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    padding: 4px;
    background: #fff;
    border: 1px solid var(--divider-color);
    border-radius: 8px;
    flex-shrink: 0;
}

.summary-item .si-name { flex: 1; color: var(--primary-color); }
.summary-item strong { color: var(--primary-color); white-space: nowrap; }

.free-ship-bar { background: #fff; border-radius: 10px; padding: 14px 16px; font-size: 14px; line-height: 1.4; margin-bottom: 18px; }
.free-ship-bar .bar { height: 5px; background: var(--ivory-deep); border-radius: 3px; margin-top: 10px; overflow: hidden; }
.free-ship-bar .bar span { display: block; height: 100%; background: var(--accent-color); border-radius: 3px; }

/* ---------- Checkout ---------- */
.checkout-card {
    background: #fff;
    border: 1px solid var(--divider-color);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 24px;
}

.checkout-card label { display: block; font-size: 14px; font-weight: 600; color: var(--primary-color); margin-bottom: 7px; }
.checkout-card .field-error { color: #9b2c22; font-size: 13px; margin-top: 5px; }
.checkout-card .is-invalid { border-color: #9b2c22; }

.check-line {
    display: flex !important;
    gap: 12px;
    align-items: flex-start;
    font-weight: 400 !important;
    line-height: 1.5;
    color: var(--text-color) !important;
    cursor: pointer;
}

.check-line input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--primary-color); }
.check-line a { color: var(--primary-color); text-decoration: underline; text-underline-offset: 3px; }

.secure-note { display: flex; gap: 8px; align-items: center; font-size: 13px; line-height: 1.4; margin-top: 16px; justify-content: center; text-align: center; }

.shop-alert { padding: 15px 20px; border-radius: 10px; margin-bottom: 26px; font-size: 15px; line-height: 1.5; }
.shop-alert.success { background: #e8f4ec; color: #1c6b41; }
.shop-alert.error { background: #fbe9e7; color: #9b2c22; }
.shop-alert.info { background: var(--ivory); color: var(--primary-color); }
.shop-alert a { color: inherit; text-decoration: underline; font-weight: 600; }

.thank-you-icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--accent-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    margin-bottom: 24px;
    box-shadow: 0 0 0 10px var(--ivory);
}

.thank-you-title { font-family: var(--display-font); font-size: 48px; font-weight: 600; margin-bottom: 12px; }

.status-pill {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 20px;
    background: var(--primary-color);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.shop-legal h2 { font-family: var(--display-font); font-size: 30px; font-weight: 600; margin: 38px 0 12px; }
.shop-legal p, .shop-legal li { font-size: 16px; line-height: 1.8; }
.shop-legal a { color: var(--accent-dark); text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .summary-box { position: static; margin-top: 34px; }
    .product-info { position: static; }
    .product-info h1 { font-size: 40px; }
    .shop-toolbar { flex-direction: column; align-items: stretch; }
    .shop-filters .shop-search { flex: 1; }
    .shop-filters input { width: 100%; }
}

@media (max-width: 767px) {
    .shop-section { padding: 50px 0 70px; }
    .shop-no-banner .shop-main { padding-top: 72px; }
    .shop-no-banner .shop-section { padding-top: 30px; }
    .shop-categories { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin: 0 -12px; padding-left: 12px; padding-right: 12px; scrollbar-width: none; }
    .shop-categories::-webkit-scrollbar { display: none; }
    .shop-chip { white-space: nowrap; padding: 9px 18px; font-size: 14px; }
    .shop-filters { flex-wrap: wrap; }
    .shop-filters select { flex: 1; }
    .product-info h1 { font-size: 32px; }
    .pc-name { font-size: 19px; }
    .pc-price { font-size: 17px; margin-bottom: 12px; }
    .product-card .pc-body { padding: 14px 12px 16px; }
    .product-card .btn-shop { padding: 10px 8px; font-size: 13px; gap: 6px; }
    .pc-badge { top: 10px; left: 10px; }
    .product-perks { grid-template-columns: 1fr; }
    .product-buy { flex-wrap: wrap; }
    .product-buy .btn-shop { flex-basis: 100%; }
    .shop-subtitle { font-size: 28px; }
    .thank-you-title { font-size: 34px; }
    .checkout-steps { margin-bottom: 34px; }
    .checkout-steps li { font-size: 10.5px; letter-spacing: .04em; }

    .cart-table thead { display: none; }
    .cart-table tr { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--divider-color); }
    .cart-table td { border: none; padding: 0; }
    .cart-table td.cart-td-product { grid-column: 1 / -1; }
    .cart-table td.cart-td-price { display: none; }
    .cart-product img { width: 68px; height: 68px; }
    .cart-product a { font-size: 19px; }
    .checkout-card, .summary-box { padding: 20px; }
}

/* Titolo compatto per carrello / checkout / pagamento */
.funnel-title {
    font-family: var(--display-font);
    font-size: 52px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 34px;
}

@media (max-width: 767px) {
    .funnel-title { font-size: 36px; margin-bottom: 24px; }
}
.shop-main nav[aria-label="breadcrumb"] { margin-bottom: 30px !important; }

/* ---------- Zoom immagine prodotto ---------- */
.product-gallery-main { position: relative; }

.product-gallery-main img { transition: transform .25s ease-out; will-change: transform; }

.product-gallery-main.can-zoom { cursor: zoom-in; }

.product-gallery-main.is-zooming img { transition: transform .25s ease-out, transform-origin .08s linear; }

.zoom-hint {
    display: none;
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 7px 14px;
    border-radius: 20px;
    background: rgba(9, 19, 52, .78);
    color: #fff;
    font-size: 12px;
    letter-spacing: .02em;
    pointer-events: none;
    transition: opacity .2s;
}

.product-gallery-main.can-zoom .zoom-hint { display: inline-flex; align-items: center; gap: 7px; }
.product-gallery-main.is-zooming .zoom-hint { opacity: 0; }
