/* Dflex Woo Theme - Single Product Styles */

.dflex-single-product-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #1a1a1a;
}

.dflex-single-breadcrumbs {
    margin-bottom: 20px;
    font-size: 13px;
    color: #888;
}

.dflex-single-breadcrumbs a {
    color: #888;
    text-decoration: none;
}

.dflex-single-breadcrumbs a:hover {
    color: #F5A623;
}

.dflex-single-grid {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.dflex-single-image-col {
    flex: 0 0 50%;
    min-width: 0;
}

.dflex-single-main-img {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
}

.dflex-single-main-img img {
    width: 100%;
    display: block;
    height: auto;
}

.dflex-single-thumbnails {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.dflex-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.2s;
    flex-shrink: 0;
}

.dflex-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dflex-thumb:hover {
    opacity: 0.9;
}

.dflex-thumb.active {
    opacity: 1;
    border-color: #F5A623;
    /* Accent */
}

.dflex-single-info-col {
    flex: 1;
    min-width: 0;
    padding-top: 10px;
}

.dflex-single-title {
    margin: 0 0 16px;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.2;
}

.dflex-single-desc {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 24px;
}

.dflex-single-price-wrap {
    margin-bottom: 16px;
}

.dflex-single-price {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.dflex-single-price del {
    color: #aaa;
    margin-right: 8px;
    font-weight: 500;
}

.dflex-single-price ins {
    text-decoration: none;
    color: #e53e3e;
    font-weight: 600;
}

.dflex-single-stock {
    font-size: 14px;
    color: #34c759;
    font-weight: 600;
    margin-bottom: 24px;
    padding: 6px 12px;
    background: rgba(52, 199, 89, 0.1);
    border-radius: 6px;
    display: inline-block;
}

.dflex-single-stock.low-stock {
    color: #e67c00;
    background: rgba(230, 124, 0, 0.12);
}

.dflex-single-stock.out-of-stock,
.dflex-single-stock.on-order {
    color: var(--dflex-color-error, var(--color-danger, #dc3232));
    background: var(--dflex-color-error-bg, rgba(220, 50, 50, 0.1));
}

/* Action block spacing */
.dflex-single-action-form {
    margin-top: 24px;
}

/* Variations Pills Styling (Popup Style) */
.dflex-single-variations-wrap {
    margin-bottom: 24px;
}

.dflex-var-attr-row {
    margin-bottom: 20px;
}

.dflex-var-attr-label {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.dflex-var-attr-options {
    display: flex;
    flex-wrap: wrap;
    background: #F0F0F5;
    border-radius: 16px;
    padding: 6px;
    gap: 6px;
    text-align: center;
    max-width: 100%;
}

.dflex-var-attr-pill {
    flex: 1 1 auto;
    min-width: 48px;
    max-width: 100%;
    border: none;
    border-radius: 12px;
    padding: 9px 14px;
    background: transparent;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    color: #555;
    position: relative;
    box-sizing: border-box;
}

.dflex-var-attr-radio {
    display: none;
}

.dflex-var-attr-pill.active {
    background: var(--dflex-color-primary, #7bc06d);
    color: #fff !important;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
}

.dflex-var-attr-pill:not(.active):hover {
    background: rgba(0, 0, 0, 0.06);
}

.dflex-single-footer-action {
    display: flex;
    gap: 16px;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid #ebebeb;
}

.dflex-qty-control {
    display: flex;
    align-items: center;
    background: #f3f3f7;
    border-radius: 12px;
    overflow: hidden;
}

.dflex-qty-control button {
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.dflex-qty-control button:hover {
    background: #e9e9ed;
    color: #1a1a1a;
    transform: none !important;
}

.dflex-qty-input {
    width: 40px;
    height: 48px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    -moz-appearance: textfield;
    appearance: textfield;
}

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

.dflex-btn-single-add {
    flex-grow: 1;
    background: var(--dflex-color-primary);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dflex-btn-single-add:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.dflex-btn-single-add:hover:not(:disabled) {
    opacity: 0.7;
}

.dflex-btn-notify-stock {
    /* Inherits .dflex-btn-single-add 1-to-1 */
}

.dflex-btn_single-add.added,
.dflex-btn-single-add.is-added {
    background: var(--dflex-color-success, #4caf50) !important;
}

/* Mobile responsive */
@media (max-width: 768px) {

    .dflex-single-product-container,
    .dflex-single-grid,
    .dflex-single-info-col,
    .dflex-single-image-col {
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .dflex-single-title {
        font-size: 22px !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }

    .dflex-single-breadcrumbs {
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }

    .dflex-option-group-items {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)) !important;
        gap: 10px !important;
    }

    .dflex-single-grid {
        flex-direction: column;
        gap: 20px;
    }

    .dflex-single-image-col {
        width: 100%;
    }

    .dflex-single-footer-action {
        flex-direction: column;
    }

    .dflex-qty-control {
        width: 100%;
        justify-content: space-between;
    }

    .dflex-qty-control input {
        width: 100%;
    }
}

/* =========================================
   Addons (Toppings) Styling
   ========================================= */
.dflex-addon-card {
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    background: #fff;
    transition: 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    user-select: none;
}

.dflex-addon-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.dflex-addon-card.is-selected {
    border-color: #FF9800 !important;
    box-shadow: 0 4px 14px rgba(255, 152, 0, 0.15) !important;
}

.dflex-addon-check {
    display: none;
    position: absolute;
    top: 6px;
    right: 6px;
    background: #FF9800;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.4);
}

.dflex-addon-card.is-selected .dflex-addon-check {
    display: flex !important;
}

/* Breadcrumbs fixed inside right col */
.dflex-single-info-col .dflex-single-breadcrumbs {
    margin-bottom: 24px;
    font-size: 13px;
    color: #888;
}

.dflex-option-group {
    margin-bottom: 24px;
}

.dflex-option-group:last-child {
    margin-bottom: 0;
}

.dflex-option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    user-select: none;
    transition: 0.2s;
}

.dflex-option-item input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #FF9800;
}

.dflex-option-label-text {
    font-size: 14px;
    color: #333;
}

.dflex-opt-price {
    color: #FF9800;
    font-weight: 600;
    font-size: 0.95em;
    margin-left: 4px;
}

/* Card Grid Layout */
.dflex-option-group-items {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

/* Image-based Options (Image-Checkbox/Radio) */
.dflex-option-item.has-image {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: 110px;
    min-height: 120px;
    border: 1.5px solid #eee;
    border-radius: 14px;
    padding: 12px 8px;
    margin-right: 12px;
    margin-bottom: 12px;
    text-align: center;
    background: #fff;
    position: relative;
}

.dflex-option-item.has-image input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.dflex-option-image-wrapper {
    width: 64px;
    height: 64px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dflex-option-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.dflex-option-item.has-image .dflex-option-label {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
    color: #444;
}

.dflex-option-item.has-image:hover {
    border-color: #ddd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dflex-option-item.has-image.is-selected {
    border-color: #FF9800;
    background: #fffdf9;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.15);
}

/* Highlight style when native checkbox is checked (as fallback) */
.dflex-option-item.has-image:has(input:checked) {
    border-color: #FF9800;
    background: #fffdf9;
}

/* Extracted Inline Styles from class-single-product.php */
.dflex-single-variation-data {
    display: none;
}

.dflex-addons-wrap {
    margin-top: 24px;
}

.dflex-addons-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.dflex-addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
    gap: 12px;
}

.dflex-addon-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.dflex-addon-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 8px;
}

.dflex-addon-name {
    font-size: 12px;
    font-weight: 500;
    color: #111;
    line-height: 1.2;
    margin-bottom: 6px;
}

.dflex-addon-price {
    font-size: 14px;
    font-weight: 600;
    color: #111;
}

.dflex-addon-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.dflex-adv-options-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
}

.dflex-required-asterisk {
    color: red;
}

.woocommerce a.added_to_cart {
    display: none !important;
}

.dflex-gallery-arrow {
    display: none !important;
}