/* ── DTF Product Templates: Ready 2 Press ── */

/* ── Product Page ── */

.dtf-template-r2p .woocommerce-product-gallery {
    margin-bottom: 0;
}

.dtf-template-r2p .woocommerce-product-gallery .woocommerce-product-gallery__image img {
    border-radius: var(--dtf-radius);
    box-shadow: var(--dtf-shadow);
}

/* Hide WooCommerce tabs — description shown in custom section */
.dtf-template-r2p .woocommerce-tabs {
    display: none !important;
}

/* ── Variation Selector ── */

.dtf-template-r2p .variations {
    margin-bottom: 16px;
}

.dtf-template-r2p .variations td.label {
    font-weight: 600;
    color: var(--dtf-primary);
    padding-right: 12px;
    font-size: 14px;
}

.dtf-template-r2p .variations select {
    border: 2px solid var(--dtf-border);
    border-radius: var(--dtf-radius);
    padding: 10px 14px;
    font-size: 14px;
    min-width: 180px;
    transition: border-color 0.2s;
}

.dtf-template-r2p .variations select:focus {
    border-color: var(--dtf-primary);
    outline: none;
}

/* ── Selected Variation Price ── */

.dtf-template-r2p .woocommerce-variation-price .price {
    font-size: 22px;
    font-weight: 700;
    color: var(--dtf-primary);
    margin-bottom: 12px;
}

/* ── Add to Cart Button ── */

.dtf-template-r2p .single_add_to_cart_button {
    background: var(--dtf-accent) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--dtf-radius) !important;
    padding: 14px 32px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    font-family: 'Work Sans', 'Inter', sans-serif !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
}

.dtf-template-r2p .single_add_to_cart_button:hover {
    background: var(--dtf-accent-hover) !important;
    transform: translateY(-1px);
}

/* ── Quantity Input ── */

.dtf-template-r2p .quantity .qty {
    border: 2px solid var(--dtf-border);
    border-radius: var(--dtf-radius);
    padding: 10px;
    font-size: 16px;
    width: 70px;
    text-align: center;
}

/* ── R2P Description Section ── */

.dtf-description--r2p {
    background: var(--dtf-bg-light);
    border-radius: var(--dtf-radius);
    border: 1px solid var(--dtf-border);
}

/* ── R2P Category Archive Sidebar ── */

.dtf-r2p-sidebar {
    padding: 20px;
    background: #fff;
    border-radius: var(--dtf-radius);
    box-shadow: var(--dtf-shadow);
    margin-bottom: 24px;
}

.dtf-r2p-widget {
    margin-bottom: 24px;
}

.dtf-r2p-widget:last-child {
    margin-bottom: 0;
}

.dtf-r2p-widget__title {
    font-family: 'Bebas Neue', 'Inter', sans-serif;
    font-size: 20px;
    color: var(--dtf-primary);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--dtf-accent);
}

/* ── Subcategory List ── */

.dtf-r2p-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dtf-r2p-cat-list li {
    margin-bottom: 4px;
}

.dtf-r2p-cat-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    color: var(--dtf-text);
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
}

.dtf-r2p-cat-list li a:hover {
    background: var(--dtf-bg-light);
    color: var(--dtf-primary);
}

.dtf-r2p-cat-list li.current a {
    background: var(--dtf-primary);
    color: #fff;
    font-weight: 600;
}

.dtf-r2p-cat-list li.current .dtf-r2p-count {
    color: rgba(255,255,255,0.8);
}

.dtf-r2p-count {
    font-size: 12px;
    color: var(--dtf-text-light);
}

/* ── Tag Cloud ── */

.dtf-r2p-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dtf-r2p-tag {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    color: var(--dtf-text);
    background: var(--dtf-bg-light);
    border: 1px solid var(--dtf-border);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.15s;
}

.dtf-r2p-tag:hover {
    background: var(--dtf-primary);
    color: #fff;
    border-color: var(--dtf-primary);
}

.dtf-r2p-tag.active {
    background: var(--dtf-accent);
    color: #fff;
    border-color: var(--dtf-accent);
}

/* ── Product Page Tag Cloud ── */

.dtf-r2p-product-tags {
    margin-top: 24px;
    padding: 20px 24px;
    background: #fff;
    border-radius: var(--dtf-radius);
    border: 1px solid var(--dtf-border);
}

.dtf-r2p-product-tags__title {
    font-family: 'Bebas Neue', 'Inter', sans-serif;
    font-size: 18px;
    color: var(--dtf-primary);
    margin: 0 0 12px;
}

/* ══════════════════════════════════════════════
   R2P Category Archive Layout
   ══════════════════════════════════════════════ */

/* Widen content area to fit sidebar + products */
body.dtf-template-r2p-archive .site-content .content-area {
    max-width: 1320px;
}

/* 2-column grid: sidebar | products */
body.dtf-template-r2p-archive .inside-article {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    align-items: start;
    padding: 30px 0 !important;
}

/* Sticky sidebar */
body.dtf-template-r2p-archive .dtf-r2p-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    margin-bottom: 0;
}

/* Product grid: 3 columns */
body.dtf-template-r2p-archive ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Uniform product images */
body.dtf-template-r2p-archive ul.products li.product a img {
    aspect-ratio: 1 / 1;
    object-fit: contain;
    width: 100%;
    background: #fff;
    border-radius: var(--dtf-radius);
}

/* Hide subcategory placeholders (CSS fallback) */
body.dtf-template-r2p-archive ul.products li.product-category {
    display: none;
}

/* ── Tablet (768-1199px) ── */

@media (min-width: 768px) and (max-width: 1199px) {
    body.dtf-template-r2p-archive .inside-article {
        grid-template-columns: 220px 1fr;
        gap: 20px;
    }
    body.dtf-template-r2p-archive ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ── Mobile (<768px) ── */

@media (max-width: 767px) {
    .dtf-template-r2p .single_add_to_cart_button {
        padding: 12px 24px !important;
        font-size: 15px !important;
    }

    .dtf-template-r2p .woocommerce-variation-price .price {
        font-size: 20px;
    }

    body.dtf-template-r2p-archive .inside-article {
        display: block;
    }

    body.dtf-template-r2p-archive .dtf-r2p-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
        margin-bottom: 20px;
    }

    body.dtf-template-r2p-archive ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
}
