/* ============================================================
   DIAGRAM — Single Product Page
   ============================================================ */

/* ── Page wrapper ────────────────────────────────────────── */
.dg-single-page {
    background: #fff;
}

.dg-single-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ── WC Notices ──────────────────────────────────────────── */
.dg-single-page .woocommerce-notices-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

.dg-single-page .woocommerce-message,
.dg-single-page .woocommerce-error,
.dg-single-page .woocommerce-info {
    font-family: var(--dg-font);
    font-size: 0.875rem;
    border-radius: 0;
    border-top: 3px solid var(--dg-text);
    padding: 14px 16px;
    margin-bottom: 0;
    list-style: none;
}

.dg-single-page .woocommerce-error {
    border-top-color: #c0392b;
    background: #fff8f8;
}

.dg-single-page .woocommerce-message {
    border-top-color: #2a7a3b;
    background: #f6fdf7;
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.dg-single-breadcrumb {
    border-bottom: 1px solid #e5e5e5;
    padding: 12px 0;
}

.dg-single-breadcrumb .woocommerce-breadcrumb {
    font-family: var(--dg-font);
    font-size: 0.78rem;
    color: #999;
    letter-spacing: 0.02em;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
}

.dg-single-breadcrumb .woocommerce-breadcrumb a {
    color: #999;
    text-decoration: none;
}

.dg-single-breadcrumb .woocommerce-breadcrumb a:hover {
    color: var(--dg-text);
}

/* ── 2-column layout ─────────────────────────────────────── */
.dg-single-wrap {
    display: grid;
    grid-template-columns: 1fr 0.72fr;
    gap: 48px;
    padding: 36px 0 64px;
    align-items: start;
}

/* ── Gallery column ──────────────────────────────────────── */
.dg-single-gallery {
    display: flex;
    flex-direction: row;
    gap: 12px;
    position: sticky;
    top: 88px;
}

/* Thumbnail strip — left vertical */
.dg-gallery-thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 78px;
    flex-shrink: 0;
    max-height: 520px;
    overflow-y: auto;
    scrollbar-width: none;
    align-self: flex-start;
}

.dg-gallery-thumbs::-webkit-scrollbar { display: none; }

.dg-gallery-thumb {
    display: block;
    width: 78px;
    height: 94px;
    overflow: hidden;
    background: #f0f0f0;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    transition: border-color 0.2s;
    outline: none;
    flex-shrink: 0;
}

.dg-gallery-thumb.active,
.dg-gallery-thumb:hover {
    border-color: var(--dg-text);
}

.dg-gallery-thumb .dg-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* Main image */
.dg-gallery-main {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    background: #f0f0f0;
    aspect-ratio: 3 / 3;
    position: relative;
    align-self: flex-start;
    cursor: zoom-in;
}

.dg-gallery-slide {
    position: absolute;
    inset: 0;
    display: none;
}

.dg-gallery-slide.active {
    display: block;
}

.dg-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.25s ease;
    will-change: transform;
}

.dg-gallery-slide.dg-zoomed .dg-main-img {
    transform: scale(2.2);
}

/* Dot indicators — hidden on desktop, shown on mobile */
.dg-gallery-dots {
    display: none;
}

/* ── Product info column ─────────────────────────────────── */
.dg-single-info {
    display: flex;
    flex-direction: column;
}

/* Title */
.dg-single-title {
    font-family: var(--dg-font);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--dg-text);
    margin: 0 0 10px;
    letter-spacing: 0.005em;
}

/* Price */
.dg-single-price {
    margin-bottom: 10px;
    font-family: var(--dg-font);
}

.dg-single-price .price,
.dg-single-price .woocommerce-Price-amount {
    font-family: var(--dg-font) !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: var(--dg-text) !important;
}

.dg-single-price .price del {
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    color: #999 !important;
    opacity: 1 !important;
    margin-right: 6px;
}

.dg-single-price .price ins {
    text-decoration: none !important;
}

/* Short description */
.dg-single-short-desc {
    font-family: var(--dg-font);
    font-size: 0.82rem;
    line-height: 1.7;
    color: #666;
    margin-bottom: 14px;
}

.dg-single-short-desc p { margin: 0; }

/* Meta (availability / brand) */
.dg-single-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e5e5;
}

.dg-meta-row {
    display: flex;
    align-items: center;
    font-family: var(--dg-font);
    font-size: 0.82rem;
    line-height: 1.6;
}

.dg-meta-label {
    color: var(--dg-text);
    font-weight: 600;
    min-width: 88px;
}

.dg-meta-sep {
    color: #999;
    margin: 0 2px;
}

.dg-meta-val { color: var(--dg-text); }

.dg-in-stock  { color: #2a7a3b; font-weight: 500; }
.dg-out-stock { color: #c0392b; font-weight: 500; }

/* ── Form ────────────────────────────────────────────────── */
.dg-single-form {
    display: flex;
    gap:10px;
    flex-direction: column;
}

.dg-single-form .single_variation_wrap {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

.dg-single-form .woocommerce-variation-description,
.dg-single-form .woocommerce-variation-availability {
    display: none !important;
}

/* ── Attribute swatch block ──────────────────────────────── */
.dg-attr-block {
    margin-bottom: 16px;
}

.dg-attr-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.dg-attr-label {
    font-family: var(--dg-font);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--dg-text);
}

.dg-attr-chosen {
    font-weight: 400;
    color: #666;
    margin-left: 3px;
}

.dg-attr-placeholder {
    color: #aaa;
    font-style: italic;
    font-weight: 400;
}

.dg-size-guide-link {
    font-family: var(--dg-font);
    font-size: 0.75rem;
    color: #555 !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 3px;
    transition: color 0.15s;
}

.dg-size-guide-link:hover {
    color: var(--dg-text) !important;
    text-decoration: underline !important;
}

/* Swatch row */
.dg-swatch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.dg-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 34px;
    padding: 0 12px;
    border: 1.5px solid #ccc;
    background: #fff;
    border-radius: 4px;
    font-family: var(--dg-font);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--dg-text);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    line-height: 1;
    outline: none;
}

.dg-swatch:hover {
    border-color: var(--dg-text);
}

.dg-swatch.selected {
    border-color: var(--dg-text);
    background: var(--dg-text);
    color: #fff;
}

/* ── Quantity ─────────────────────────────────────────────── */
.dg-qty-block {
    display: flex;
    align-items: stretch;
    border: 1.5px solid #ccc;
    max-width: 135px;
    margin-bottom: 10px;
    border-radius: 0;
}

.dg-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 44px;
    background: none;
    border: none;
    font-family: var(--dg-font);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--dg-text);
    cursor: pointer;
    transition: background 0.15s;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
    outline: none;
    user-select: none;
}

.dg-qty-btn:hover { background: #f5f5f5; }
.dg-qty-btn:active { background: #ebebeb; }

.dg-qty-input {
    width: 52px;
    height: 44px;
    border: none;
    border-left: 1.5px solid #ccc;
    border-right: 1.5px solid #ccc;
    text-align: center;
    font-family: var(--dg-font);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dg-text);
    background: none;
    -moz-appearance: textfield;
    outline: none;
    padding: 0;
    cursor: default;
}

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

/* ── Add to Cart button ──────────────────────────────────── */
.dg-btn-atc {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    width: 100% !important;
    padding: 0 20px !important;
    height: 48px !important;
    background: var(--dg-text) !important;
    color: #fff !important;
    border: none !important;
    font-family: var(--dg-font) !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    border-radius: 0 !important;
    transition: background 0.2s !important;
    text-decoration: none !important;
    line-height: 1 !important;
    box-shadow: none !important;
    margin-bottom: 8px;
}

.dg-btn-atc:hover:not(:disabled):not(.disabled) {
    background: #222 !important;
    color: #fff !important;
}

.dg-btn-atc:disabled,
.dg-btn-atc.disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
}

.dg-btn-atc svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.dg-btn-atc.loading::after {
    content: '';
    display: inline-block;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dg-spin 0.7s linear infinite;
    margin-left: 6px;
}

@keyframes dg-spin {
    to { transform: rotate(360deg); }
}

/* ── COD button ──────────────────────────────────────────── */
.dg-btn-cod {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    width: 100% !important;
    padding: 0 20px !important;
    height: 48px !important;
    background: #2a7a3b !important;
    color: #fff !important;
    border: none !important;
    font-family: var(--dg-font) !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    border-radius: 0 !important;
    transition: background 0.2s !important;
    text-decoration: none !important;
    line-height: 1 !important;
    box-shadow: none !important;
    margin-bottom: 20px !important;
    outline: none;
}

.dg-btn-cod:hover {
    background: #1f5e2c !important;
    color: #fff !important;
}

.dg-btn-cod svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* ── Accordions ──────────────────────────────────────────── */
.dg-accordions {
    border-top: 1px solid #e5e5e5;
}

.dg-accordion {
    border-bottom: 1px solid #e5e5e5;
}

.dg-accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 0;
    background: none;
    border: none;
    font-family: var(--dg-font);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--dg-text);
    cursor: pointer;
    text-align: left;
    outline: none;
    line-height: 1.4;
}

.dg-accordion-toggle:hover { color: #555; }

.dg-accordion-icon {
    font-size: 1.15rem;
    font-weight: 300;
    line-height: 1;
    color: var(--dg-text);
    flex-shrink: 0;
    transition: transform 0.22s;
    margin-left: 12px;
    display: inline-block;
}

.dg-accordion-toggle[aria-expanded="true"] .dg-accordion-icon {
    transform: rotate(45deg);
}

.dg-accordion-content {
    padding-bottom: 18px;
    font-family: var(--dg-font);
    font-size: 0.82rem;
    line-height: 1.8;
    color: #555;
}

.dg-accordion-content[hidden] { display: none; }

.dg-accordion-content p   { margin: 0 0 10px; }
.dg-accordion-content p:last-child { margin-bottom: 0; }
.dg-accordion-content ul,
.dg-accordion-content ol {
    padding-left: 18px;
    margin: 0 0 10px;
}

/* ── Reviews ─────────────────────────────────────────────── */
.dg-reviews-section {
    background: #fff;
    padding-bottom: 72px;
}

.dg-reviews-section .dg-single-container {
    padding-top: 60px;
    border-top: 1px solid #e8e6e1;
}

/* Top bar: heading + button */
.dg-reviews-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.dg-reviews-heading {
    font-family: var(--dg-font);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dg-text);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin: 0 0 12px;
}

/* Average rating block */
.dg-reviews-avg {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dg-avg-score {
    font-family: var(--dg-font);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--dg-text);
    line-height: 1;
}

.dg-avg-stars {
    display: flex;
    gap: 2px;
}

.dg-star { font-size: 1.1rem; line-height: 1; }
.dg-star--full  { color: #e6a817; }
.dg-star--half  { color: #e6a817; opacity: 0.55; }
.dg-star--empty { color: #d4d0c8; }

.dg-avg-count {
    font-family: var(--dg-font);
    font-size: 0.8rem;
    color: var(--dg-muted);
    letter-spacing: 0.01em;
}

.dg-reviews-none {
    font-size: 0.875rem;
    color: var(--dg-muted);
    margin: 8px 0 0;
}

/* Write a Review button */
.dg-write-review-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 28px;
    border: 1.5px solid var(--dg-text);
    background: transparent;
    font-family: var(--dg-font);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--dg-text);
    cursor: pointer;
    border-radius: 2px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.dg-write-review-btn:hover {
    background: var(--dg-text);
    color: #fff;
}

/* ── Review cards list ── */
.dg-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dg-review-card {
    display: flex;
    gap: 20px;
    padding: 28px 0;
    border-bottom: 1px solid #eeece8;
}

.dg-review-card:first-child {
    border-top: 1px solid #eeece8;
}

.dg-review-avatar {
    flex-shrink: 0;
}

.dg-avatar-img {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
}

.dg-review-body {
    flex: 1;
    min-width: 0;
}

.dg-review-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.dg-review-author {
    font-family: var(--dg-font);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--dg-text);
}

.dg-review-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #2d8c45;
    letter-spacing: 0.01em;
}

.dg-review-date {
    font-size: 0.78rem;
    color: var(--dg-muted);
    margin-left: auto;
}

.dg-review-stars {
    display: flex;
    gap: 2px;
    margin-bottom: 10px;
}

.dg-review-stars .dg-star { font-size: 1rem; }

.dg-review-text {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--dg-text);
}

.dg-review-text p { margin: 0 0 8px; }
.dg-review-text p:last-child { margin-bottom: 0; }

/* ── Review form ── */
.dg-review-form-wrap {
    margin-top: 40px;
    padding: 36px 40px;
    background: #f7f6f3;
    border-radius: 6px;
}

.dg-review-form-title {
    font-family: var(--dg-font);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--dg-text);
    margin: 0 0 28px;
}

/* Star picker */
.dg-rating-field { margin-bottom: 24px; }

.dg-field-label {
    display: block;
    font-family: var(--dg-font);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--dg-text);
    margin-bottom: 10px;
}

.dg-field-label span { color: #c0392b; }

/* CSS-only star rating — reversed flex so higher values are first in HTML */
.dg-star-picker {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

.dg-star-radio { display: none; }

.dg-star-label {
    font-size: 1.8rem;
    color: #d4d0c8;
    cursor: pointer;
    transition: color 0.15s;
    line-height: 1;
}

/* Highlight hovered star and all siblings to its right (i.e. lower values, which come later in DOM due to reverse) */
.dg-star-label:hover,
.dg-star-label:hover ~ .dg-star-label {
    color: #e6a817;
}

/* Highlight selected star and all lower-value siblings */
.dg-star-radio:checked ~ .dg-star-label {
    color: #e6a817;
}

/* Form layout */
.dg-form-row { display: flex; gap: 20px; }
.dg-form-row--2col > * { flex: 1; }

.dg-form-group { margin-bottom: 20px; }

.dg-review-input,
.dg-review-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #ddd9d1;
    border-radius: 4px;
    font-family: var(--dg-font);
    font-size: 0.875rem;
    color: var(--dg-text);
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
    appearance: none;
    outline: none;
}

.dg-review-input:focus,
.dg-review-textarea:focus {
    border-color: var(--dg-text);
}

.dg-review-textarea { resize: vertical; min-height: 110px; }

.dg-form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.dg-review-submit {
    padding: 13px 36px;
    background: var(--dg-text);
    color: #fff;
    border: none;
    font-family: var(--dg-font);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    transition: background 0.2s;
}

.dg-review-submit:hover { background: #2a2a2a; }

.dg-review-cancel {
    background: none;
    border: none;
    font-family: var(--dg-font);
    font-size: 0.8rem;
    color: var(--dg-muted);
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    transition: color 0.2s;
}

.dg-review-cancel:hover { color: var(--dg-text); }

/* Responsive */
@media (max-width: 768px) {
    .dg-reviews-section .dg-single-container { padding-top: 40px; }
    .dg-reviews-section { padding-bottom: 48px; }
    .dg-reviews-top { flex-direction: column; gap: 16px; }
    .dg-review-form-wrap { padding: 24px 20px; }
    .dg-form-row--2col { flex-direction: column; gap: 0; }
    .dg-avg-score { font-size: 1.8rem; }
    .dg-review-date { margin-left: 0; }
}

@media (max-width: 480px) {
    .dg-review-card { gap: 14px; }
    .dg-avatar-img { width: 38px !important; height: 38px !important; }
    .dg-review-form-wrap { padding: 20px 16px; }
    .dg-star-label { font-size: 1.5rem; }
}

/* ── Related products ────────────────────────────────────── */
.dg-single-related {
    background: #f5f4f1;
    padding-bottom: 80px;
}

.dg-single-related .dg-single-container {
    padding-top: 64px;
}

/* Header row: heading + arrows */
.dg-related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 20px;
}

/* Decorative heading */
.dg-related-heading {
    font-family: var(--dg-font);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dg-text);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
}

.dg-related-heading::before {
    content: '';
    display: block;
    width: 32px;
    height: 2px;
    background: var(--dg-text);
    flex-shrink: 0;
}

/* Scroll arrows */
.dg-related-arrows {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.dg-related-arrow {
    width: 40px;
    height: 40px;
    border: 1.5px solid var(--dg-text);
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    color: var(--dg-text);
    padding: 0;
}

.dg-related-arrow:hover {
    background: var(--dg-text);
    color: #fff;
}

.dg-related-arrow svg {
    width: 16px;
    height: 16px;
    display: block;
    flex-shrink: 0;
}

.dg-related-arrow:disabled {
    opacity: 0.3;
    cursor: default;
}

/* ── Scrollable track ─── */
.dg-related-track-wrap {
    overflow: hidden;
    position: relative;
}

.dg-related-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 20px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 0 12px !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
}

.dg-related-grid::-webkit-scrollbar { display: none; }

/* Cards */
.dg-single-related .dg-product-card {
    flex: 0 0 260px !important;
    width: 260px !important;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    scroll-snap-align: start;
    transition: box-shadow 0.28s ease, transform 0.28s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}

.dg-single-related .dg-product-card:hover {
    box-shadow: 0 12px 36px rgba(0,0,0,0.14);
    transform: translateY(-5px);
}

/* Square image ratio */
.dg-single-related .dg-card-photo::after {
    padding-top: 100%;
}

/* Pill badge */
.dg-single-related .dg-badge {
    border-radius: 20px;
    font-size: 0.63rem;
    padding: 4px 10px;
    top: 10px;
    left: 10px;
}

/* Info below image */
.dg-single-related .dg-card-info {
    padding: 14px 16px 18px;
    align-items: flex-start;
    text-align: left;
}

.dg-single-related .dg-card-name {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
}

.dg-single-related .dg-card-price {
    margin-top: 5px;
}

/* Footer: view more */
.dg-related-footer {
    text-align: center;
    margin-top: 36px;
}

.dg-related-view-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 48px;
    border: 1.5px solid var(--dg-text);
    font-family: var(--dg-font);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--dg-text) !important;
    text-decoration: none !important;
    transition: background 0.22s ease, color 0.22s ease;
    background: transparent;
    border-radius: 2px;
}

.dg-related-view-more:hover {
    background: var(--dg-text);
    color: #fff !important;
}

/* ── Suppress WooCommerce default output ─────────────────── */
.dg-single-page .woocommerce-product-gallery,
.dg-single-page .entry-summary,
.dg-single-page .woocommerce-tabs,
.dg-single-page .related.products,
.dg-single-page .up-sells {
    display: none !important;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 1280px) {
    .dg-single-container,
    .dg-single-page .woocommerce-notices-wrapper {
        padding-left: 32px;
        padding-right: 32px;
    }
    .dg-single-wrap { gap: 36px; }
}

@media (max-width: 1024px) {
    .dg-single-container,
    .dg-single-page .woocommerce-notices-wrapper {
        padding-left: 24px;
        padding-right: 24px;
    }
    .dg-single-wrap {
        grid-template-columns: 1fr 0.8fr;
        gap: 28px;
        padding: 28px 0 52px;
    }
    .dg-gallery-thumbs { width: 64px; }
    .dg-gallery-thumb  { width: 64px; height: 78px; }
    .dg-single-title   { font-size: 1.25rem; }
    .dg-single-related .dg-product-card { flex: 0 0 230px !important; width: 230px !important; }
    .dg-related-grid   { gap: 16px !important; }
}

/* Tablet portrait — stack */
@media (max-width: 768px) {
    .dg-single-container,
    .dg-single-page .woocommerce-notices-wrapper {
        padding-left: 18px;
        padding-right: 18px;
    }

    .dg-single-wrap {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 0 48px;
    }

    /* Stack gallery: main image on top, thumbs below as horizontal strip */
    .dg-single-gallery {
        position: static;
        flex-direction: column;
        gap: 8px;
    }

    .dg-gallery-main {
        aspect-ratio: 4 / 5;
        width: 100%;
        align-self: auto;
    }

    .dg-gallery-thumbs {
        width: 100%;
        flex-direction: row;
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .dg-gallery-thumbs::-webkit-scrollbar { display: none; }

    .dg-gallery-thumb {
        width: 60px;
        height: 72px;
        flex-shrink: 0;
    }

    .dg-single-title { font-size: 1.15rem; }

    .dg-related-grid { gap: 14px !important; }
    .dg-single-related .dg-product-card { flex: 0 0 200px !important; width: 200px !important; }

    .dg-single-related          { padding-bottom: 48px; }
    .dg-single-related .dg-single-container { padding-top: 40px; }
    .dg-related-heading         { font-size: 1.1rem; letter-spacing: 0.05em; }
    .dg-related-header          { margin-bottom: 24px; }
    .dg-related-footer          { margin-top: 28px; }
}

@media (max-width: 600px) {
    .dg-single-container,
    .dg-single-page .woocommerce-notices-wrapper {
        padding-left: 14px;
        padding-right: 14px;
    }

    .dg-gallery-main  { aspect-ratio: 3 / 4; }
    .dg-gallery-thumb { width: 54px; height: 64px; }

    .dg-single-title { font-size: 1.05rem; }

    .dg-btn-atc,
    .dg-btn-cod {
        font-size: 0.72rem !important;
        letter-spacing: 0.08em !important;
        height: 46px !important;
    }
}

@media (max-width: 480px) {
    .dg-single-wrap { gap: 16px; padding-bottom: 36px; }

    .dg-gallery-main  { aspect-ratio: 1 / 1; }
    .dg-gallery-thumbs { display: none; }

    /* Show dot indicators on very small screens */
    .dg-gallery-main { position: relative; }
    .dg-gallery-dots {
        display: flex;
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        gap: 5px;
        z-index: 2;
    }
    .dg-gallery-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: rgba(255,255,255,0.5);
        border: none;
        padding: 0;
        cursor: pointer;
        transition: background 0.2s, transform 0.2s;
    }
    .dg-gallery-dot.active {
        background: #fff;
        transform: scale(1.3);
    }

    .dg-single-title { font-size: 1rem; line-height: 1.45; }

    .dg-swatch { min-width: 34px; height: 32px; padding: 0 10px; font-size: 0.76rem; }

    .dg-qty-btn   { width: 34px; height: 40px; }
    .dg-qty-input { width: 44px; height: 40px; font-size: 0.85rem; }

    .dg-btn-atc,
    .dg-btn-cod {
        height: 44px !important;
        font-size: 0.68rem !important;
        letter-spacing: 0.07em !important;
        gap: 7px !important;
    }

    .dg-accordion-toggle { font-size: 0.8rem; padding: 14px 0; }

    .dg-related-grid { gap: 12px !important; }
    .dg-single-related .dg-product-card { flex: 0 0 170px !important; width: 170px !important; }
    .dg-related-heading { font-size: 0.95rem; }
    .dg-related-arrow { width: 34px; height: 34px; }
    .dg-related-arrow svg { width: 14px; height: 14px; }
    .dg-related-view-more { padding: 11px 28px; font-size: 0.65rem; letter-spacing: 0.14em; }
    .dg-single-related { padding-bottom: 36px; }
    .dg-single-related .dg-single-container { padding-top: 28px; }
    .dg-related-footer { margin-top: 24px; }
    .dg-single-related .dg-card-info { padding: 10px 12px 14px; }
    .dg-single-related .dg-product-card:hover { transform: translateY(-3px); }
}

@media (max-width: 360px) {
    .dg-single-container,
    .dg-single-page .woocommerce-notices-wrapper {
        padding-left: 12px;
        padding-right: 12px;
    }
    .dg-single-title { font-size: 0.95rem; }
    .dg-btn-atc svg,
    .dg-btn-cod svg { width: 14px !important; height: 14px !important; }
}

/* =====================================================
   SIZE GUIDE MODAL
   ===================================================== */

.dg-size-guide-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.dg-size-guide-overlay.is-open {
    opacity: 1;
}
.dg-size-guide-overlay[hidden] {
    display: none;
}

.dg-size-guide-modal {
    background: #fff;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 2px;
    transform: translateY(12px);
    transition: transform 0.2s ease;
}
.dg-size-guide-overlay.is-open .dg-size-guide-modal {
    transform: translateY(0);
}

.dg-size-guide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--dg-border);
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.dg-size-guide-title {
    font-family: var(--dg-font);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0;
    color: var(--dg-text);
}
.dg-size-guide-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--dg-muted);
    line-height: 1;
    padding: 4px;
    transition: color 0.15s;
}
.dg-size-guide-close:hover { color: var(--dg-text); }

.dg-size-guide-body { padding: 24px; }

.dg-size-guide-img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 20px;
}

.dg-size-guide-content {
    font-family: var(--dg-font);
    font-size: 0.85rem;
    color: var(--dg-text);
    line-height: 1.6;
}
.dg-size-guide-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.dg-size-guide-content th,
.dg-size-guide-content td {
    border: 1px solid var(--dg-border);
    padding: 8px 12px;
    text-align: center;
}
.dg-size-guide-content th {
    background: var(--dg-offwhite);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.72rem;
}
.dg-size-guide-content tr:nth-child(even) td { background: var(--dg-offwhite); }

@media (max-width: 480px) {
    .dg-size-guide-modal { max-height: 95vh; }
    .dg-size-guide-body { padding: 16px; }
    .dg-size-guide-header { padding: 14px 16px; }
    .dg-size-guide-content table { font-size: 0.75rem; }
    .dg-size-guide-content th,
    .dg-size-guide-content td { padding: 6px 8px; }
}
