/* Shopify-style product detail page */
.shop-product-page { padding: 24px 0 80px; }
.shop-breadcrumb { font-size: 0.75rem; color: #737373; margin-bottom: 24px; }
.shop-breadcrumb a { color: #737373; text-decoration: none; }
.shop-breadcrumb a:hover { text-decoration: underline; }
.shop-breadcrumb span { color: #171717; }

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

/* Gallery */
.shop-gallery { position: sticky; top: 132px; }
.shop-gallery-main {
    position: relative;
    aspect-ratio: 1;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}
.shop-gallery-main img,
.shop-gallery-main video.shop-gallery-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}
.shop-gallery-main video.shop-gallery-video {
    position: absolute;
    inset: 0;
    background: #111;
}
.shop-gallery-main.is-showing-video img { opacity: 0; pointer-events: none; }
.shop-gallery-main video.shop-gallery-video.hidden { display: none !important; }
.shop-gallery-main.is-showing-video video.shop-gallery-video:not(.hidden) { display: block; }
.shop-gallery-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.shop-thumb {
    position: relative;
    width: 72px;
    height: 72px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: #f5f5f5;
    flex-shrink: 0;
}
.shop-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-thumb.active, .shop-thumb:hover { border-color: #171717; }
.shop-thumb-video-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.28);
    pointer-events: none;
}
.shop-thumb-video-badge::after {
    content: '';
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23171717'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Product info */
.shop-info { padding-top: 4px; }
.shop-vendor { font-size: 0.72rem; color: #8A8175; text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 10px; }
.shop-title { font-family: 'Inter', 'Segoe UI', -apple-system, Arial, sans-serif; font-size: 2rem; font-weight: 600; line-height: 1.2; color: #0E1F33; margin-bottom: 16px; letter-spacing: 0.01em; }
.shop-price-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.shop-price { font-size: 1.25rem; font-weight: 600; color: #171717; }
.shop-price-compare { font-size: 1rem; color: #737373; text-decoration: line-through; }
.shop-price-badge { font-size: 0.75rem; background: #fef2f2; color: #dc2626; padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.shop-delivery {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 4px 0 14px;
    padding: 12px 14px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}
.shop-delivery-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #525252;
    line-height: 1.4;
}
.shop-delivery-row strong { color: #171717; font-weight: 600; }
.shop-delivery-icon {
    display: inline-flex;
    color: #737373;
    flex-shrink: 0;
}
.shop-sku-line { font-size: 0.8rem; color: #737373; margin-bottom: 20px; }
.shop-sku-line strong { color: #525252; font-weight: 500; }
.shop-stock { font-size: 0.85rem; margin-bottom: 24px; }
.shop-stock.in-stock { color: #16a34a; }
.shop-stock.low-stock { color: #ca8a04; }
.shop-stock.out-of-stock { color: #dc2626; }

.shop-divider { border: none; border-top: 1px solid #e5e5e5; margin: 24px 0; }

/* Option selectors */
.shop-option { margin-bottom: 20px; }
.shop-option-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #171717;
    margin-bottom: 10px;
}
.shop-option-label span { font-weight: 400; color: #737373; }
.shop-option-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-pill {
    min-width: 48px;
    padding: 10px 18px;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    background: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    color: #171717;
}
.shop-pill:hover:not(:disabled) { border-color: #171717; }
.shop-pill.selected { border-color: #171717; background: #171717; color: white; }
.shop-pill:disabled, .shop-pill.unavailable {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Quantity */
.shop-qty-row { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.shop-qty-label { font-size: 0.85rem; font-weight: 600; color: #171717; }
.shop-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    overflow: hidden;
}
.shop-qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: white;
    font-size: 1.1rem;
    cursor: pointer;
    color: #171717;
    line-height: 1;
}
.shop-qty-btn:hover:not(:disabled) { background: #f5f5f5; }
.shop-qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.shop-qty-input {
    width: 48px;
    height: 40px;
    border: none;
    border-left: 1px solid #d4d4d4;
    border-right: 1px solid #d4d4d4;
    text-align: center;
    font-size: 0.9rem;
    -moz-appearance: textfield;
}
.shop-qty-input::-webkit-outer-spin-button,
.shop-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Notes */
.shop-notes { margin-bottom: 24px; }
.shop-notes-label { display: block; font-size: 0.85rem; font-weight: 600; color: #171717; margin-bottom: 8px; }
.shop-notes-hint { font-size: 0.75rem; color: #737373; font-weight: 400; }
.shop-notes textarea {
    width: 100%;
    min-height: 88px;
    padding: 12px 14px;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s;
}
.shop-notes textarea:focus { border-color: #171717; }
.shop-notes-count { text-align: right; font-size: 0.7rem; color: #a3a3a3; margin-top: 4px; }

/* Buttons */
.shop-actions { display: flex; flex-direction: column; gap: 10px; }
.shop-btn-primary {
    width: 100%;
    padding: 16px 24px;
    background: #17518E;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.15s;
}
.shop-btn-primary:hover:not(:disabled) { background: #0D3F73; }
.shop-btn-primary:disabled { background: #a3a3a3; cursor: not-allowed; }
.shop-btn-secondary {
    width: 100%;
    padding: 14px 24px;
    background: white;
    color: #171717;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s;
}
.shop-btn-secondary:hover { border-color: #171717; }

.shop-share {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e5e5e5;
}

.shop-share-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #737373;
    margin-bottom: 10px;
}

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

.shop-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid #e5e5e5;
    background: #fff;
    color: #404040;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.shop-share-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.shop-share-btn:hover {
    border-color: #171717;
    color: #171717;
    background: #fafafa;
}

.shop-share-facebook:hover { border-color: #1877F2; color: #1877F2; }
.shop-share-twitter:hover { border-color: #111; color: #111; }
.shop-share-pinterest:hover { border-color: #E60023; color: #E60023; }
.shop-share-whatsapp:hover { border-color: #25D366; color: #128C7E; }
.shop-share-copy.is-copied {
    border-color: #16a34a;
    color: #16a34a;
}

.shop-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #171717;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 0.85rem;
    z-index: 3000;
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    pointer-events: none;
    white-space: nowrap;
}
.shop-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* Accordion (Item Details / Policies) */
.shop-accordion {
    margin-top: 28px;
    border-top: 1px solid #e5e5e5;
}
.shop-acc-item { border-bottom: 1px solid #e5e5e5; }
.shop-acc-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: #171717;
    text-align: left;
}
.shop-acc-trigger:hover { color: #404040; }
.shop-acc-icon {
    font-size: 1.15rem;
    font-weight: 400;
    color: #737373;
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.2s;
}
.shop-acc-trigger[aria-expanded="true"] .shop-acc-icon { transform: rotate(45deg); }
.shop-acc-panel[hidden] { display: none; }
.shop-acc-body {
    padding: 0 0 18px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #3A4A42;
    background: transparent;
}
.shop-desc-short,
.shop-acc-body,
.shop-desc-short *:not(img):not(video):not(svg),
.shop-acc-body *:not(img):not(video):not(svg) {
    background: transparent !important;
    background-color: transparent !important;
}
.shop-acc-body p { margin: 0 0 10px; }
.shop-acc-body ul,
.shop-acc-body ol { padding-left: 1.2rem; margin: 8px 0 12px; }
.shop-acc-body li { margin-bottom: 6px; }
.shop-acc-body a { color: #171717; text-decoration: underline; }
.shop-acc-links { font-size: 0.85rem; margin-top: 4px; }
.shop-pdp-guides { margin-top: 18px; }

/* Customer reviews */
.shop-reviews { margin-top: 48px; padding-top: 32px; border-top: 1px solid #e5e5e5; }
.shop-reviews-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.shop-reviews-header-left {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}
.shop-reviews h2 { font-size: 1.1rem; font-weight: 600; color: #171717; margin: 0; }
.shop-reviews-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #525252;
}
.shop-reviews-avg { font-weight: 600; color: #171717; }
.shop-reviews-count { color: #737373; }
.shop-btn-review {
    padding: 8px 16px;
    border: 1px solid #171717;
    background: white;
    color: #171717;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.shop-btn-review:hover { background: #171717; color: white; }

.shop-review-form {
    margin-bottom: 28px;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}
.shop-review-form-row { margin-bottom: 16px; }
.shop-review-form-row label,
.shop-review-form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #171717;
    margin-bottom: 8px;
}
.shop-review-form-row input[type="text"],
.shop-review-form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    background: white;
    box-sizing: border-box;
}
.shop-review-form-row input[type="text"]:focus,
.shop-review-form-row textarea:focus { border-color: #171717; }
.shop-file-input {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.shop-file-input-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.shop-file-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border: 1px solid #171717;
    border-radius: 4px;
    background: white;
    color: #171717;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin: 0;
    transition: background 0.15s, color 0.15s;
    user-select: none;
}
.shop-file-btn:hover { background: #171717; color: white; }
.shop-file-input-native:focus + .shop-file-btn {
    outline: 2px solid #171717;
    outline-offset: 2px;
}
.shop-file-name {
    font-size: 0.85rem;
    color: #737373;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.shop-review-rating { display: flex; gap: 4px; }
.shop-rate-star {
    border: none;
    background: transparent;
    color: #d4d4d4;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}
.shop-rate-star.active,
.shop-rate-star:hover { color: #ca8a04; }
.shop-review-media-preview {
    margin-top: 10px;
    max-width: 200px;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
}
.shop-review-media-preview img,
.shop-review-media-preview video {
    display: block;
    width: 100%;
    height: auto;
}
.shop-review-form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.shop-review-form-actions .shop-btn-primary,
.shop-review-form-actions .shop-btn-secondary {
    width: auto;
    min-width: 140px;
    padding: 12px 20px;
}
.shop-review-form-error {
    margin: 12px 0 0;
    font-size: 0.85rem;
    color: #dc2626;
}
.shop-stars { color: #d4d4d4; letter-spacing: 1px; font-size: 0.95rem; line-height: 1; }
.shop-star.filled { color: #ca8a04; }
.shop-reviews-list { display: flex; flex-direction: column; gap: 20px; }
.shop-review {
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}
.shop-review:last-child { border-bottom: none; padding-bottom: 0; }
.shop-review-top { margin-bottom: 10px; }
.shop-review-author { display: flex; align-items: center; gap: 12px; }
.shop-review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #525252;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.shop-review-name { font-size: 0.9rem; font-weight: 600; color: #171717; margin-bottom: 4px; }
.shop-review-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: #a3a3a3;
}
.shop-review-content {
    font-size: 0.9rem;
    line-height: 1.65;
    color: #525252;
    margin: 0 0 12px;
}
.shop-review-media {
    width: 112px;
    max-width: 112px;
    border-radius: 4px;
    overflow: hidden;
    background: linear-gradient(180deg, #F4F7FA 0%, #E2EAF2 100%);
    border: 1px solid rgba(15, 23, 42, 0.06);
}
.shop-review-media img,
.shop-review-media video {
    display: block;
    width: 100%;
    height: 112px;
    padding: 8px;
    box-sizing: border-box;
    object-fit: contain;
    object-position: center;
    vertical-align: top;
}
.shop-review-media img { cursor: zoom-in; }
.shop-reviews-empty { font-size: 0.9rem; color: #a3a3a3; margin: 0; }

/* Loading / error */
.shop-loading, .shop-error { text-align: center; padding: 80px 20px; color: #737373; }
.shop-error { color: #dc2626; }

/* Mobile sticky bar */
.shop-mobile-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e5e5;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 900;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
    align-items: center;
    gap: 12px;
}
.shop-mobile-bar-price { font-size: 1.1rem; font-weight: 700; color: #171717; flex-shrink: 0; }
.shop-mobile-bar .shop-btn-primary { flex: 1; padding: 14px 16px; }

/* Responsive */
@media (max-width: 900px) {
    .shop-product-grid { grid-template-columns: 1fr; gap: 24px; }
    .shop-gallery { position: static; }
    .shop-title { font-size: 1.4rem; }
    /* Add horizontal padding on small screens so content doesn't touch edges */
    .shop-product-page { padding: 24px 16px 100px; }
    .shop-mobile-bar { display: flex; }
    .shop-actions .shop-btn-primary { display: none; }
}

@media (max-width: 480px) {
    .shop-thumb { width: 56px; height: 56px; }
    .shop-pill { padding: 8px 14px; font-size: 0.8rem; }
}

.hidden { display: none !important; }

.shop-product-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}
.shop-cat-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid #e5e5e5;
    background: #fafafa;
    color: #404040;
    font-size: 0.78rem;
    text-decoration: none;
    line-height: 1.2;
}
.shop-cat-chip:hover {
    border-color: #a3a3a3;
    background: #f5f5f5;
    color: #171717;
}


/* AI finder prompt on product page */
.shop-pdp-ai {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-left: 3px solid #17518E;
    background: #F4F7FA;
    border-radius: 0 4px 4px 0;
    font-size: 0.84rem;
    line-height: 1.5;
    color: #475569;
}
.shop-pdp-ai a {
    color: #17518E;
    font-weight: 700;
}
