/*
 * Dynasty Nerds Single Product — v1.0.0
 * All rules scoped to #dn-product-wrapper
 * Zero Tailwind dependency.
 */

/* ══════════════════════════════════
   ELEMENTOR OVERRIDES (scoped)
   ══════════════════════════════════ */
#dn-product-wrapper * {
    box-sizing: border-box;
}
#dn-product-wrapper a {
    text-decoration: none !important;
    color: inherit !important;
}
#dn-product-wrapper a:hover {
    text-decoration: none !important;
}
#dn-product-wrapper p {
    margin: 0;
}
#dn-product-wrapper img {
    border: none !important;
    box-shadow: none !important;
}
#dn-product-wrapper h1,
#dn-product-wrapper h2,
#dn-product-wrapper h3 {
    margin: 0;
    padding: 0;
}
#dn-product-wrapper button,
#dn-product-wrapper input[type="submit"] {
    border: none;
    cursor: pointer;
}
#dn-product-wrapper select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    background: #fff;
    color: #334155;
    width: 100%;
    max-width: 280px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
#dn-product-wrapper select:focus {
    outline: none;
    border-color: #1a2f4a;
    box-shadow: 0 0 0 3px rgba(26,47,74,0.1);
}

/* ══════════════════════════════════
   PAGE BACKGROUND
   ══════════════════════════════════ */
body:has(#dn-product-wrapper) {
    background: #f3f4f6 !important;
}

/* ══════════════════════════════════
   LAYOUT
   ══════════════════════════════════ */
#dn-product-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 60px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #334155;
    -webkit-font-smoothing: antialiased;
}

/* ── Breadcrumbs ── */
#dn-product-wrapper .dn-product-breadcrumbs ol {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 16px 0;
    font-size: 13px;
    color: #94a3b8;
}
#dn-product-wrapper .dn-product-breadcrumbs li {
    display: flex;
    align-items: center;
}
#dn-product-wrapper .dn-product-breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin: 0 8px;
    color: #cbd5e1;
}
#dn-product-wrapper .dn-product-breadcrumbs a {
    color: #64748b !important;
}
#dn-product-wrapper .dn-product-breadcrumbs a:hover {
    color: #B2150D !important;
}
#dn-product-wrapper .dn-product-breadcrumbs li[aria-current] {
    color: #334155;
    font-weight: 500;
}

/* ── Two-Column Product Layout ── */
#dn-product-wrapper .dn-product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    margin-top: 16px;
}
/* Image column stretches to match details height */
#dn-product-wrapper .dn-product-gallery {
    position: sticky;
    top: 24px;
}

/* ══════════════════════════════════
   IMAGE GALLERY
   ══════════════════════════════════ */
#dn-product-wrapper .dn-gallery-main {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}
#dn-product-wrapper .dn-gallery-main-img {
    width: 100%;
    height: auto;
    display: block;
    padding: 0 !important;
    margin: 0 !important;
}
#dn-product-wrapper .dn-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
#dn-product-wrapper .dn-gallery-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    padding: 0;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s;
}
#dn-product-wrapper .dn-gallery-thumb:hover {
    border-color: #94a3b8;
}
#dn-product-wrapper .dn-gallery-thumb--active {
    border-color: #1a2f4a;
}
#dn-product-wrapper .dn-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    padding: 0 !important;
    margin: 0 !important;
}

/* ══════════════════════════════════
   PRODUCT DETAILS
   ══════════════════════════════════ */
#dn-product-wrapper .dn-product-title {
    font-family: 'Teko', sans-serif;
    font-size: 36px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    color: #1a2f4a;
    line-height: 1.1;
    margin-bottom: 12px !important;
}
#dn-product-wrapper .dn-product-price {
    font-size: 24px;
    font-weight: 700;
    color: #1a2f4a;
    margin-bottom: 16px;
}
#dn-product-wrapper .dn-product-price del {
    color: #94a3b8;
    font-weight: 400;
    font-size: 18px;
    margin-right: 8px;
}
#dn-product-wrapper .dn-product-price ins {
    text-decoration: none;
    color: #B2150D;
}
#dn-product-wrapper .dn-product-short-desc {
    font-size: 15px;
    line-height: 1.6;
    color: #64748b;
    margin-bottom: 24px;
}
#dn-product-wrapper .dn-product-short-desc p {
    margin-bottom: 8px !important;
}

/* ── Variation Form ── */
#dn-product-wrapper .dn-product-add-to-cart {
    margin-bottom: 24px;
}
#dn-product-wrapper .variations {
    margin-bottom: 16px;
}
#dn-product-wrapper .variations td,
#dn-product-wrapper .variations th {
    padding: 6px 0;
    border: none;
}
#dn-product-wrapper .variations .label label {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}
#dn-product-wrapper .woocommerce-variation-price {
    margin-bottom: 12px;
}
#dn-product-wrapper .woocommerce-variation-description p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px !important;
}

/* ── Quantity ── */
#dn-product-wrapper .quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 12px;
}
#dn-product-wrapper .quantity .qty {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 15px;
    font-weight: 600;
    padding: 10px 4px;
    color: #334155;
    -moz-appearance: textfield;
}
#dn-product-wrapper .quantity .qty::-webkit-outer-spin-button,
#dn-product-wrapper .quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#dn-product-wrapper .dn-qty-btn {
    width: 36px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #64748b;
    font-size: 18px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    padding: 0;
}
#dn-product-wrapper .dn-qty-btn:hover {
    background: #e5e7eb;
    color: #334155;
}

/* ── Add to Cart Button ── */
#dn-product-wrapper .single_add_to_cart_button,
#dn-product-wrapper button.button.alt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #B2150D !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 14px 32px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 14px rgba(178,21,13,0.3);
}
#dn-product-wrapper .single_add_to_cart_button:hover,
#dn-product-wrapper button.button.alt:hover {
    background: #8e1009 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(178,21,13,0.4);
}
#dn-product-wrapper .single_add_to_cart_button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ── Reset link ── */
#dn-product-wrapper .reset_variations {
    display: inline-block;
    margin-left: 12px;
    font-size: 13px;
    color: #64748b !important;
}
#dn-product-wrapper .reset_variations:hover {
    color: #B2150D !important;
}

/* ══════════════════════════════════
   DESCRIPTION (inline in details column)
   ══════════════════════════════════ */
#dn-product-wrapper .dn-product-description {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}
#dn-product-wrapper .dn-product-description-heading {
    font-family: 'Teko', sans-serif;
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
    color: #1a2f4a;
    margin-bottom: 8px !important;
}
#dn-product-wrapper .dn-product-description-content {
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
}
#dn-product-wrapper .dn-product-description-content p {
    margin-bottom: 8px !important;
}

/* ══════════════════════════════════
   RELATED PRODUCTS
   ══════════════════════════════════ */
#dn-product-wrapper .dn-product-related {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e5e7eb;
}
#dn-product-wrapper .dn-product-related h2 {
    font-family: 'Teko', sans-serif;
    font-size: 28px;
    font-weight: 600;
    text-transform: uppercase;
    color: #1a2f4a;
    margin-bottom: 24px !important;
}
#dn-product-wrapper .dn-shop-grid--related {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ── Related Product Cards (same styles as shop grid) ── */
#dn-product-wrapper .dn-product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
#dn-product-wrapper .dn-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
#dn-product-wrapper .dn-product-card-link {
    display: block;
}
#dn-product-wrapper .dn-product-card-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}
#dn-product-wrapper .dn-product-card-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    max-width: none !important;
}
#dn-product-wrapper .dn-product-card:hover .dn-product-card-image img {
    transform: scale(1.05);
}
#dn-product-wrapper .dn-product-card-info {
    padding: 16px;
    flex: 1;
}
#dn-product-wrapper .dn-product-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 6px;
    line-height: 1.3;
}
#dn-product-wrapper .dn-product-card-price {
    font-size: 14px;
    font-weight: 600;
    color: #1a2f4a;
}
#dn-product-wrapper .dn-product-card-price del {
    color: #94a3b8;
    font-weight: 400;
    margin-right: 6px;
}
#dn-product-wrapper .dn-product-card-price ins {
    text-decoration: none;
    color: #B2150D;
}
#dn-product-wrapper .dn-product-card-actions {
    padding: 0 16px 16px;
}
#dn-product-wrapper .dn-product-card-actions .button,
#dn-product-wrapper .dn-product-card-actions a.button,
#dn-product-wrapper .dn-product-card-actions a.add_to_cart_button {
    display: block;
    width: 100%;
    text-align: center;
    background: #1a2f4a !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none !important;
    line-height: 1.4 !important;
}
#dn-product-wrapper .dn-product-card-actions .button:hover,
#dn-product-wrapper .dn-product-card-actions a.button:hover,
#dn-product-wrapper .dn-product-card-actions a.add_to_cart_button:hover {
    background: #B2150D !important;
}

/* ══════════════════════════════════
   WOOCOMMERCE NOTICES
   ══════════════════════════════════ */
#dn-product-wrapper .woocommerce-info,
#dn-product-wrapper .woocommerce-message,
#dn-product-wrapper .woocommerce-error {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}
#dn-product-wrapper .woocommerce-message {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

/* ══════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════ */
@media (max-width: 768px) {
    #dn-product-wrapper {
        padding: 0 16px 40px;
    }
    #dn-product-wrapper .dn-product-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    #dn-product-wrapper .dn-product-title {
        font-size: 28px;
    }
    #dn-product-wrapper .dn-product-price {
        font-size: 20px;
    }
    #dn-product-wrapper .dn-shop-grid--related {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    #dn-product-wrapper .dn-gallery-thumb {
        width: 56px;
        height: 56px;
    }
}
