/* =========================================================
   DMH – Custom Single Product Page
   Font: Noto Sans Armenian
   ========================================================= */

/* ---------- Material Symbols ---------- */
.dmh-single-product .material-symbols-outlined,
.dmh-sp-lightbox .material-symbols-outlined {
    display: inline-block;
    width: 20px;
    min-width: 20px;
    height: 20px;
    overflow: hidden;
    vertical-align: middle;
    font-style: normal;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Reset / Base ---------- */
.dmh-single-product *,
.dmh-single-product *::before,
.dmh-single-product *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.dmh-single-product {
    font-family: 'Noto Sans Armenian', 'Inter', sans-serif;
    color: #111827;
    background: #fff;
    padding: 32px 0 60px;
    line-height: 1.6;
}

/* ---------- Breadcrumbs ---------- */
.dmh-sp-breadcrumbs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.dmh-sp-breadcrumbs nav {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #6B7280;
    flex-wrap: wrap;
}

.dmh-sp-breadcrumbs nav a {
    color: #6B7280;
    text-decoration: none;
    transition: color .2s;
}

.dmh-sp-breadcrumbs nav a:hover {
    color: #EF4444;
}

.dmh-sp-breadcrumbs nav .sep {
    font-size: 16px;
    line-height: 1;
}

.dmh-sp-breadcrumbs nav .current {
    font-weight: 500;
    color: #111827;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dmh-sp-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6B7280;
}

.dmh-sp-nav a,
.dmh-sp-nav button {
    background: none;
    border: none;
    cursor: pointer;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: color .2s;
    font-size: 20px;
    text-decoration: none;
}

.dmh-sp-nav a:hover,
.dmh-sp-nav button:hover {
    color: #EF4444;
}

/* ---------- Layout: 2 columns ---------- */
.dmh-sp-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

/* ---------- Gallery ---------- */
.dmh-sp-gallery {
    display: flex;
    flex-direction: column-reverse;
    gap: 16px;
}

.dmh-sp-main-image {
    position: relative;
    background: #f9fafb;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    cursor: zoom-in;
}

.dmh-sp-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 24px;
    transition: transform .5s ease;
}

.dmh-sp-main-image:hover img {
    transform: scale(1.1);
}

.dmh-sp-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #EF4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 2;
    font-family: 'Noto Sans Armenian', sans-serif;
}

.dmh-sp-expand {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6B7280;
    transition: color .2s, box-shadow .2s;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.dmh-sp-expand:hover {
    color: #EF4444;
    box-shadow: 0 2px 8px rgba(0,0,0,.14);
}

/* Thumbnails row */
.dmh-sp-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.dmh-sp-thumb {
    border: 1.5px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fff;
    transition: border-color .2s;
    padding: 6px;
}

.dmh-sp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dmh-sp-thumb:hover,
.dmh-sp-thumb.active {
    border-color: #EF4444;
}

/* ---------- Summary (right column) ---------- */
.dmh-sp-summary {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Title */
.dmh-sp-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.3;
    color: #111827;
    margin-bottom: 16px;
    font-family: 'Noto Sans Armenian', sans-serif;
}

/* Price row */
.dmh-sp-price-row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 24px;
}

.dmh-sp-price {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}

.dmh-sp-stock {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #16a34a;
    margin-bottom: 4px;
}

.dmh-sp-stock .material-symbols-outlined {
    font-size: 16px;
}

/* Buttons */
.dmh-sp-buttons {
    display: flex;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 20px;
}

/* ATC form stretches like the button did */
.dmh-atc-form {
    flex: 1;
    display: flex;
    margin: 0;
    padding: 0;
}
.dmh-atc-form .dmh-atc-btn {
    flex: 1;
    width: 100%;
}

.dmh-sp-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Noto Sans Armenian', sans-serif;
    text-decoration: none;
    line-height: 1.4;
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow, background;
    outline: none;
}

.dmh-sp-btn:active {
    transform: translateY(1px) scale(0.98) !important;
}

.dmh-sp-btn-primary {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.dmh-sp-btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(30deg) translate(-100%, -100%);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.dmh-sp-btn-primary:hover {
    background: linear-gradient(135deg, #F87171 0%, #EF4444 100%);
    box-shadow: 0 8px 22px rgba(239, 68, 68, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    color: #fff;
    transform: translateY(-2px);
}

.dmh-sp-btn-primary:hover::after {
    transform: rotate(30deg) translate(100%, 100%);
}

.dmh-sp-btn-secondary {
    background: #fff;
    border-color: #d1d5db;
    color: #111827;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.dmh-sp-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.dmh-sp-btn .material-symbols-outlined {
    font-size: 20px;
}

.dmh-sp-btn-secondary .material-symbols-outlined {
    color: #EF4444;
}

/* Actions row (compare / wishlist) */
.dmh-sp-actions {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    font-size: 14px;
}

.dmh-sp-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    color: #6B7280;
    font-size: 14px;
    font-family: 'Noto Sans Armenian', sans-serif;
    font-weight: 500;
    padding: 0;
    transition: color .2s;
}

.dmh-sp-action-btn .material-symbols-outlined {
    font-size: 20px;
}

.dmh-sp-action-btn:hover {
    color: #EF4444;
}

/* Meta (sku, category, share) */
.dmh-sp-meta {
    border-top: 1px solid #E5E7EB;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dmh-sp-meta-row {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 14px;
}

.dmh-sp-meta-label {
    color: #6B7280;
    min-width: 96px;
}

.dmh-sp-meta-value {
    color: #111827;
    font-weight: 500;
}

.dmh-sp-meta-value a {
    color: #EF4444;
    text-decoration: none;
}

.dmh-sp-meta-value a:hover {
    text-decoration: underline;
}

.dmh-sp-share-links {
    display: flex;
    gap: 12px;
}

.dmh-sp-share-links a {
    color: #6B7280;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color .2s;
}

.dmh-sp-share-links a:hover {
    color: #EF4444;
}

/* ---------- Tabs ---------- */
.dmh-sp-tabs-section {
    margin-top: 48px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
}

.dmh-sp-tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #E5E7EB;
    padding: 0 24px;
    overflow-x: auto;
}

.dmh-sp-tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 16px 0;
    margin-right: 28px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Noto Sans Armenian', sans-serif;
    color: #6B7280;
    cursor: pointer;
    white-space: nowrap;
    transition: color .2s, border-color .2s;
}

.dmh-sp-tab-btn.active,
.dmh-sp-tab-btn:hover {
    color: #EF4444;
    border-bottom-color: #EF4444;
}

.dmh-sp-tab-content {
    display: none;
    padding: 24px;
    font-size: 14px;
    color: #6B7280;
    line-height: 1.8;
}

.dmh-sp-tab-content.active {
    display: block;
}

.dmh-sp-tab-content p {
    margin-bottom: 14px;
}

.dmh-sp-tab-content ul {
    padding-left: 20px;
    margin-bottom: 14px;
}

.dmh-sp-tab-content ul li {
    margin-bottom: 4px;
}

/* Additional info table */
.dmh-sp-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dmh-sp-info-table tr:nth-child(odd) td {
    background: #f9fafb;
}

.dmh-sp-info-table td {
    padding: 10px 14px;
    border: 1px solid #E5E7EB;
    color: #374151;
}

.dmh-sp-info-table td:first-child {
    font-weight: 600;
    color: #111827;
    width: 40%;
}

/* ---------- Related Products ---------- */
.dmh-sp-related {
    margin-top: 56px;
    border-top: 1px solid #E5E7EB;
    padding-top: 36px;
}

.dmh-sp-related-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 24px;
    font-family: 'Noto Sans Armenian', sans-serif;
}

.dmh-sp-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Product Card */
.dmh-sp-card {
    position: relative;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    background: #fff;
    transition: box-shadow .25s;
}

.dmh-sp-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.1);
}

.dmh-sp-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    background: #f3f4f6;
    margin-bottom: 14px;
}

.dmh-sp-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
    font-family: 'Noto Sans Armenian', sans-serif;
}

.dmh-sp-card-name a {
    color: inherit;
    text-decoration: none;
}

.dmh-sp-card-name a::after {
    content: '';
    position: absolute;
    inset: 0;
}

.dmh-sp-card-cat {
    font-size: 12px;
    color: #6B7280;
    margin-bottom: 10px;
    flex: 1;
}

.dmh-sp-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.dmh-sp-card-price {
    font-size: 14px;
    font-weight: 700;
    color: #EF4444;
}

.dmh-sp-card-atc {
    position: relative;
    z-index: 2;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6B7280;
    transition: background .2s, color .2s;
    font-size: 0;
}

.dmh-sp-card-atc .material-symbols-outlined {
    font-size: 18px;
}

.dmh-sp-card-atc:hover {
    background: #EF4444;
    color: #fff;
}

/* ---------- Lightbox ---------- */
.dmh-sp-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.8);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.dmh-sp-lightbox.open {
    display: flex;
}

.dmh-sp-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}
/* ---------- Button loading & success states ---------- */
@keyframes dmh-spin {
    to { transform: rotate(360deg); }
}
@keyframes dmh-pop {
    0%   { transform: scale(0.6); opacity: 0; }
    60%  { transform: scale(1.2); }
    100% { transform: scale(1);   opacity: 1; }
}

/* Spinner circle */
.dmh-btn-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dmh-spin .7s linear infinite;
}
.dmh-btn-spinner.dmh-spinner-dark {
    border-color: rgba(17,24,39,.2);
    border-top-color: #111827;
}

/* Success checkmark */
.dmh-btn-check {
    display: inline-block;
    font-size: 20px;
    line-height: 1;
    animation: dmh-pop .3s ease;
}

/* Loading state tweaks */
.dmh-sp-btn.dmh-loading,
.dmh-sp-buttons a.dmh-loading {
    pointer-events: none;
    opacity: .85;
}

/* Success state for Add to Cart */
.dmh-sp-buttons a.dmh-success {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #fff !important;
}
.dmh-sp-buttons a.dmh-success .material-symbols-outlined {
    color: #fff !important;
}

/* ---------- Tablet (≤ 1024px) ---------- */
@media (max-width: 1024px) {
    .dmh-sp-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---------- Tablet portrait (≤ 768px) ---------- */
@media (max-width: 768px) {
    .dmh-sp-main {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .dmh-sp-gallery {
        order: -1;
    }

    .dmh-sp-title {
        font-size: 22px;
    }

    .dmh-sp-price {
        font-size: 24px;
    }

    .dmh-sp-thumbs {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ---------- Mobile (≤ 480px) ---------- */
@media (max-width: 480px) {
    .dmh-single-product {
        padding: 20px 0 40px;
    }

    .dmh-sp-buttons {
        flex-direction: column;
    }

    .dmh-sp-btn {
        width: 100%;
    }

    .dmh-sp-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .dmh-sp-tabs-nav {
        padding: 0 12px;
    }

    .dmh-sp-tab-content {
        padding: 16px;
    }

    .dmh-sp-thumbs {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .dmh-sp-thumb {
        height: 68px;
    }

    .dmh-sp-breadcrumbs nav .current {
        max-width: 120px;
    }

    .dmh-sp-meta-label {
        min-width: 80px;
    }
}

@media (max-width: 360px) {
    .dmh-sp-related-grid {
        grid-template-columns: 1fr;
    }
}
