/* =========================================================
   SOGUE Accessory Product Page
   Desktop + mobile styling
   Quantity on the left, ADD TO CART on the right,
   BUY NOW full width on the next row.
   Scoped to the accessory template only.
========================================================= */

.csw-accessory-page {
    --csw-navy: #101a2e;
    --csw-text: #182235;
    --csw-muted: #758093;
    width: 100%;
    padding: 42px 24px 72px;
    background: #fff;
    color: var(--csw-text);
    box-sizing: border-box;
}

.csw-accessory-page *,
.csw-accessory-page *::before,
.csw-accessory-page *::after {
    box-sizing: border-box;
}

.csw-accessory-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.csw-accessory-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 44px;
    align-items: start;
}

/* Gallery */
.csw-accessory-gallery {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    width: 100%;
    min-width: 0;
}

.csw-accessory-main-wrap {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 9px;
    background: #f6f8fb;
}

.csw-accessory-main-wrap img,
.csw-accessory-gallery > img.csw-accessory-main-image {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    object-position: center;
    border-radius: 9px;
    background: #f6f8fb;
}

.csw-accessory-thumbnails {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 10px;
    min-width: 0;
    margin: 0;
}

.csw-accessory-thumbnail-button {
    display: block;
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.csw-accessory-thumbnail-button.is-active {
    border: 2px solid #1685ee;
}

.csw-accessory-thumbnail-button img,
.csw-accessory-thumbnail {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 5px;
}

/* Product information */
.csw-accessory-info {
    width: 100%;
    min-width: 0;
    padding-top: 2px;
    color: #252b35;
}

.csw-accessory-category {
    margin: 0 0 10px;
    color: #697586;
    font-size: 12px;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.csw-accessory-title {
    margin: 0 0 12px;
    color: var(--csw-navy);
    font-size: clamp(28px, 2.3vw, 36px);
    line-height: 1.2;
    font-weight: 700;
}

.csw-accessory-sku {
    margin: 0 0 16px;
    color: var(--csw-muted);
    font-size: 12px;
}

.csw-accessory-price {
    margin: 0 0 14px;
    color: var(--csw-navy);
    font-size: 28px;
    line-height: 1.25;
    font-weight: 700;
}

.csw-accessory-price del {
    color: #9ca3af;
    font-size: 17px;
    font-weight: 400;
}

.csw-accessory-price ins {
    text-decoration: none;
}

.csw-accessory-description {
    margin: 0 0 20px;
    color: #596273;
    font-size: 14px;
    line-height: 1.65;
}

.csw-accessory-description p:last-child {
    margin-bottom: 0;
}

/* Purchase form: quantity + Add to Cart on row 1; Buy Now on row 2.
   Explicitly position WooCommerce form children to avoid grid auto-placement. */
.csw-accessory-page .csw-accessory-info form.cart {
    display: grid !important;
    grid-template-columns: 138px minmax(0, 1fr) !important;
    grid-template-rows: 48px 48px !important;
    align-items: stretch !important;
    gap: 10px 12px !important;
    width: 100% !important;
    margin: 18px 0 0 !important;
    padding: 0 !important;
}

/* WooCommerce variation selector / variation data should occupy full width if present */
.csw-accessory-page .csw-accessory-info form.cart .variations,
.csw-accessory-page .csw-accessory-info form.cart .single_variation_wrap,
.csw-accessory-page .csw-accessory-info form.cart .reset_variations,
.csw-accessory-page .csw-accessory-info form.cart .woocommerce-variation,
.csw-accessory-page .csw-accessory-info form.cart .woocommerce-variation-add-to-cart {
    grid-column: 1 / -1;
    min-width: 0;
}

.csw-accessory-page .csw-accessory-info form.cart .quantity {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    float: none !important;
    width: 138px !important;
    height: 48px !important;
    min-height: 48px !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 8px;
    border: 1px solid #d5dce6;
    border-radius: 5px;
    background: #fff;
}

.csw-accessory-page .csw-accessory-info form.cart .quantity input.qty {
    flex: 1 1 auto;
    width: 58px !important;
    min-width: 0;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 3px !important;
    border: 0 !important;
    outline: 0;
    background: transparent;
    box-shadow: none !important;
    color: var(--csw-navy);
    font-size: 15px;
    text-align: center;
}

.csw-accessory-page .csw-accessory-info form.cart .quantity .minus,
.csw-accessory-page .csw-accessory-info form.cart .quantity .plus {
    display: inline-flex;
    flex: 0 0 22px;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--csw-navy);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

/* Add to Cart */
.csw-accessory-page .csw-accessory-info form.cart > button.single_add_to_cart_button,
.csw-accessory-page .csw-accessory-info form.cart .woocommerce-variation-add-to-cart > button.single_add_to_cart_button {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 10px 14px;
    border: 1px solid var(--csw-navy) !important;
    border-radius: 5px;
    background: #fff !important;
    color: var(--csw-navy) !important;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-transform: uppercase;
    box-shadow: none !important;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

.csw-accessory-page .csw-accessory-info form.cart button.single_add_to_cart_button:hover {
    background: var(--csw-navy) !important;
    color: #fff !important;
}

/* Buy Now */
.csw-accessory-page .csw-accessory-info form.cart > button.csw-accessory-buy-now,
.csw-accessory-page .csw-accessory-info form.cart .woocommerce-variation-add-to-cart > button.csw-accessory-buy-now {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 10px 16px;
    border: 1px solid var(--csw-navy) !important;
    border-radius: 5px;
    background: var(--csw-navy) !important;
    color: #fff !important;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-transform: uppercase;
    box-shadow: none !important;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
}

.csw-accessory-page .csw-accessory-info form.cart button.csw-accessory-buy-now:hover {
    background: #263b5b !important;
    border-color: #263b5b !important;
    color: #fff !important;
}

/* Service benefits */
.csw-accessory-page .csw-accessory-benefits {
    position: relative;
    clear: both;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    margin: 24px 0 0;
    padding: 20px 0 0;
    border-top: 1px solid #e6ebf2;
}

.csw-accessory-page .csw-accessory-benefit {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
}

.csw-accessory-page .csw-accessory-benefit:hover {
    border: 0;
    background: transparent;
    transform: none;
}

.csw-accessory-page .csw-accessory-benefit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--csw-navy);
    font-size: 0;
    line-height: 1;
}

.csw-accessory-page .csw-accessory-benefit:nth-child(1) .csw-accessory-benefit-icon {
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40' fill='none' stroke='%23101a2e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10h22v21H3z'/%3E%3Cpath d='M25 17h7l5 6v8H25z'/%3E%3Ccircle cx='11' cy='32' r='3.5' fill='white'/%3E%3Ccircle cx='31' cy='32' r='3.5' fill='white'/%3E%3C/svg%3E");
}

.csw-accessory-page .csw-accessory-benefit:nth-child(2) .csw-accessory-benefit-icon {
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40' fill='none' stroke='%23101a2e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 27l-2 9 9-2L33 15l-7-7L7 27z'/%3E%3Cpath d='M22 12l7 7'/%3E%3Cpath d='M5 36h30'/%3E%3C/svg%3E");
}

.csw-accessory-page .csw-accessory-benefit:nth-child(3) .csw-accessory-benefit-icon {
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40' fill='none' stroke='%23101a2e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 3l14 5v10c0 9-6 15-14 19C12 33 6 27 6 18V8z'/%3E%3Cpath d='M13 20l5 5 10-11'/%3E%3C/svg%3E");
}

.csw-accessory-page .csw-accessory-benefit strong {
    display: block;
    margin: 0 0 4px;
    color: #182235;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 700;
}

.csw-accessory-page .csw-accessory-benefit small {
    display: block;
    color: #7a8494;
    font-size: 10px;
    line-height: 1.45;
}

/* Product detail tabs */
.csw-accessory-details {
    margin-top: 46px;
    border-top: 1px solid #e6ebf2;
}

.csw-accessory-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    border-bottom: 1px solid #e6ebf2;
}

.csw-accessory-tab {
    position: relative;
    flex: 0 0 auto;
    padding: 17px 3px 15px;
    border: 0;
    background: transparent;
    color: #596273;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.csw-accessory-tab.is-active {
    color: var(--csw-navy);
    font-weight: 700;
}

.csw-accessory-tab.is-active::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: var(--csw-navy);
    content: "";
}

.csw-accessory-tab-panel {
    padding: 28px 8px;
}

.csw-accessory-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.csw-accessory-detail-grid h2 {
    margin: 0 0 12px;
    color: var(--csw-navy);
    font-size: 22px;
    line-height: 1.3;
}

.csw-accessory-detail-grid p,
.csw-accessory-detail-grid li {
    color: #596273;
    font-size: 14px;
    line-height: 1.7;
}

.csw-accessory-detail-image {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 10px;
    background: #f6f8fb;
}

.csw-accessory-page a.added_to_cart,
.csw-accessory-page .woocommerce-message {
    display: none !important;
}

/* Tablet */
@media (max-width: 900px) {
    .csw-accessory-page {
        padding: 32px 20px 52px;
    }

    .csw-accessory-layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 28px;
    }

    .csw-accessory-gallery {
        grid-template-columns: 60px minmax(0, 1fr);
        gap: 10px;
    }

    .csw-accessory-thumbnail-button {
        flex-basis: 60px;
        width: 60px;
        height: 60px;
    }

    .csw-accessory-title {
        font-size: 28px;
    }

    .csw-accessory-page .csw-accessory-info form.cart {
        grid-template-columns: 112px minmax(0, 1fr) !important;
    }

    .csw-accessory-page .csw-accessory-info form.cart .quantity {
        width: 112px !important;
    }

    .csw-accessory-page .csw-accessory-benefits {
        gap: 9px;
    }

    .csw-accessory-page .csw-accessory-benefit {
        grid-template-columns: 28px minmax(0, 1fr);
        gap: 6px;
    }

    .csw-accessory-page .csw-accessory-benefit-icon {
        width: 28px;
        height: 28px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .csw-accessory-page {
        padding: 20px 16px 40px;
    }

    .csw-accessory-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .csw-accessory-gallery {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .csw-accessory-main-wrap {
        order: 1;
        width: 100%;
        aspect-ratio: 1 / 1;
    }

    .csw-accessory-main-wrap img,
    .csw-accessory-gallery > img.csw-accessory-main-image {
        width: 100%;
        height: 100%;
        max-height: none;
        aspect-ratio: 1 / 1;
    }

    .csw-accessory-thumbnails {
        order: 2;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        width: 100%;
        overflow-x: auto;
        padding: 1px 0 5px;
    }

    .csw-accessory-thumbnail-button {
        flex: 0 0 64px;
        width: 64px;
        height: 64px;
    }

    .csw-accessory-info {
        padding-top: 0;
    }

    .csw-accessory-title {
        margin-bottom: 9px;
        font-size: 26px;
        line-height: 1.22;
    }

    .csw-accessory-sku {
        margin-bottom: 13px;
    }

    .csw-accessory-price {
        margin-bottom: 10px;
        font-size: 25px;
    }

    .csw-accessory-description {
        margin-bottom: 16px;
        font-size: 13px;
    }

    .csw-accessory-page .csw-accessory-info form.cart {
        grid-template-columns: 94px minmax(0, 1fr) !important;
        grid-template-rows: 44px 44px !important;
        gap: 9px !important;
        margin-top: 14px !important;
    }

    .csw-accessory-page .csw-accessory-info form.cart .quantity {
        width: 94px !important;
        height: 44px !important;
        min-height: 44px !important;
        padding: 0 5px;
    }

    .csw-accessory-page .csw-accessory-info form.cart .quantity input.qty {
        width: 34px !important;
        height: 40px !important;
        min-height: 40px !important;
        font-size: 14px;
    }

    .csw-accessory-page .csw-accessory-info form.cart button.single_add_to_cart_button,
    .csw-accessory-page .csw-accessory-info form.cart button.csw-accessory-buy-now,
    .csw-accessory-page .csw-accessory-info form.cart .single_add_to_cart_button,
    .csw-accessory-page .csw-accessory-info form.cart .csw-accessory-buy-now {
        height: 44px !important;
        min-height: 44px !important;
        font-size: 11px;
    }

    .csw-accessory-page .csw-accessory-benefits {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        margin-top: 20px;
        padding-top: 16px;
    }

    .csw-accessory-page .csw-accessory-benefit {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 7px;
        text-align: center;
    }

    .csw-accessory-page .csw-accessory-benefit-icon {
        width: 32px;
        height: 32px;
    }

    .csw-accessory-page .csw-accessory-benefit strong {
        font-size: 10px;
    }

    .csw-accessory-page .csw-accessory-benefit small {
        font-size: 9px;
    }

    .csw-accessory-details {
        margin-top: 30px;
    }

    .csw-accessory-tabs {
        justify-content: flex-start;
        gap: 18px;
        overflow-x: auto;
    }

    .csw-accessory-tab {
        padding: 14px 1px 12px;
        font-size: 12px;
        white-space: nowrap;
    }

    .csw-accessory-tab-panel {
        padding: 22px 0;
    }

    .csw-accessory-detail-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .csw-accessory-detail-grid h2 {
        font-size: 19px;
    }

    .csw-accessory-detail-grid p,
    .csw-accessory-detail-grid li {
        font-size: 13px;
    }

    .csw-accessory-detail-image {
        max-height: 260px;
    }
}

/* =========================================================
   FINAL PURCHASE LAYOUT FIX
   Desktop: quantity left, Add to Cart right, Buy Now below.
   Mobile: quantity on its own left-aligned row, followed by
   full-width Add to Cart and Buy Now buttons.
========================================================= */

.csw-accessory-page .csw-accessory-info form.cart {
    display: flex !important;
    flex-flow: row wrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 10px 12px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 18px 0 0 !important;
    padding: 0 0 12px !important;
    overflow: visible !important;
}

.csw-accessory-page .csw-accessory-info form.cart .quantity {
    display: flex !important;
    flex: 0 0 110px !important;
    width: 110px !important;
    height: 46px !important;
    min-height: 46px !important;
    margin: 0 !important;
    float: none !important;
    align-items: center !important;
}

.csw-accessory-page .csw-accessory-info form.cart button.single_add_to_cart_button {
    display: inline-flex !important;
    flex: 1 1 180px !important;
    width: auto !important;
    min-width: 0 !important;
    height: 46px !important;
    min-height: 46px !important;
    margin: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: normal !important;
}

.csw-accessory-page .csw-accessory-info form.cart button.csw-accessory-buy-now {
    display: inline-flex !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    margin: 0 !important;
    align-items: center !important;
    justify-content: center !important;
}

.csw-accessory-page .csw-accessory-benefits {
    position: relative !important;
    display: grid !important;
    clear: both !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 22px 0 0 !important;
    padding: 18px 0 0 !important;
    border-top: 1px solid #e6ebf2 !important;
    overflow: visible !important;
}

/* Mobile: quantity left on its own row; buttons full width below */
@media (max-width: 600px) {
    .csw-accessory-page .csw-accessory-info form.cart {
        display: flex !important;
        flex-flow: row wrap !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 9px !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 14px 0 0 !important;
        padding: 0 0 10px !important;
        overflow: visible !important;
    }

    .csw-accessory-page .csw-accessory-info form.cart .quantity {
        flex: 0 0 100% !important;
        width: 94px !important;
        max-width: 94px !important;
        height: 44px !important;
        min-height: 44px !important;
        margin: 0 !important;
        padding: 0 5px !important;
    }

    .csw-accessory-page .csw-accessory-info form.cart .quantity input.qty {
        width: 34px !important;
        height: 40px !important;
        min-height: 40px !important;
        font-size: 14px !important;
    }

    .csw-accessory-page .csw-accessory-info form.cart button.single_add_to_cart_button,
    .csw-accessory-page .csw-accessory-info form.cart .single_add_to_cart_button {
        display: inline-flex !important;
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 44px !important;
        min-height: 44px !important;
        margin: 0 !important;
        padding: 10px 14px !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 11px !important;
    }

    .csw-accessory-page .csw-accessory-info form.cart button.csw-accessory-buy-now,
    .csw-accessory-page .csw-accessory-info form.cart .csw-accessory-buy-now {
        display: inline-flex !important;
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 44px !important;
        min-height: 44px !important;
        margin: 0 !important;
        padding: 10px 14px !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 11px !important;
    }

    .csw-accessory-page .csw-accessory-benefits {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 7px !important;
        margin: 18px 0 0 !important;
        padding: 15px 0 0 !important;
    }
}

/* =========================================
   SOGUE — Unified Product Button Styles
   Append to the end of both product CSS files
========================================= */

:root {
    --csw-button-navy: #111c32;
    --csw-button-navy-hover: #243b5d;
    --csw-button-border: #111c32;
    --csw-button-radius: 5px;
}

/* Shared button appearance */
.csw-product-page .csw-product-actions .csw-add-cart,
.csw-product-page .csw-product-actions .csw-buy-now,
.csw-accessory-page .csw-accessory-info form.cart button.single_add_to_cart_button,
.csw-accessory-page .csw-accessory-info form.cart button.csw-accessory-buy-now {
    box-sizing: border-box !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 12px 18px !important;
    border: 1px solid var(--csw-button-border) !important;
    border-radius: var(--csw-button-radius) !important;
    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-align: center !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    box-shadow: none !important;
    cursor: pointer;
    transition:
        background-color .2s ease,
        color .2s ease,
        border-color .2s ease;
}

/* ADD TO CART — white with navy border */
.csw-product-page .csw-product-actions .csw-add-cart,
.csw-accessory-page .csw-accessory-info form.cart button.single_add_to_cart_button {
    background: #fff !important;
    border-color: var(--csw-button-border) !important;
    color: var(--csw-button-navy) !important;
}

/* BUY NOW — solid navy */
.csw-product-page .csw-product-actions .csw-buy-now,
.csw-accessory-page .csw-accessory-info form.cart button.csw-accessory-buy-now {
    background: var(--csw-button-navy) !important;
    border-color: var(--csw-button-navy) !important;
    color: #fff !important;
}

/* Hover */
.csw-product-page .csw-product-actions .csw-add-cart:hover,
.csw-accessory-page .csw-accessory-info form.cart button.single_add_to_cart_button:hover {
    background: var(--csw-button-navy) !important;
    border-color: var(--csw-button-navy) !important;
    color: #fff !important;
}

.csw-product-page .csw-product-actions .csw-buy-now:hover,
.csw-accessory-page .csw-accessory-info form.cart button.csw-accessory-buy-now:hover {
    background: var(--csw-button-navy-hover) !important;
    border-color: var(--csw-button-navy-hover) !important;
    color: #fff !important;
}

/* Keyboard focus */
.csw-product-page .csw-product-actions .csw-add-cart:focus-visible,
.csw-product-page .csw-product-actions .csw-buy-now:focus-visible,
.csw-accessory-page .csw-accessory-info form.cart button.single_add_to_cart_button:focus-visible,
.csw-accessory-page .csw-accessory-info form.cart button.csw-accessory-buy-now:focus-visible {
    outline: 2px solid #3b82f6 !important;
    outline-offset: 3px;
}

/* Disabled / loading state */
.csw-product-page .csw-product-actions button:disabled,
.csw-accessory-page .csw-accessory-info form.cart button:disabled {
    opacity: .55 !important;
    cursor: not-allowed !important;
}

/* Mobile: keep existing layout, standardize button height */
@media (max-width: 700px) {
    .csw-product-page .csw-product-actions .csw-add-cart,
    .csw-product-page .csw-product-actions .csw-buy-now,
    .csw-accessory-page .csw-accessory-info form.cart button.single_add_to_cart_button,
    .csw-accessory-page .csw-accessory-info form.cart button.csw-accessory-buy-now {
        min-height: 48px !important;
        font-size: 12px !important;
    }
}


/* =========================================
   SOGUE Cart Success Modal — Premium Style
   Add to the bottom of BOTH product CSS files
========================================= */

.csw-cart-success-modal[hidden] {
    display: none !important;
}

.csw-cart-success-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px !important;
    box-sizing: border-box;
}

.csw-cart-success-backdrop {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(12, 23, 43, 0.60) !important;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.csw-cart-success-dialog {
    position: relative !important;
    z-index: 1 !important;
    width: 100% !important;
    max-width: 460px !important;
    margin: auto !important;
    padding: 38px 30px 30px !important;
    border: 1px solid #eef1f5 !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 24px 80px rgba(7, 18, 39, 0.24) !important;
    color: #14213b !important;
    text-align: center !important;
    box-sizing: border-box !important;
    animation: cswPremiumModalIn 0.25s ease-out;
}

.csw-cart-success-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 62px !important;
    height: 62px !important;
    margin: 0 auto 18px !important;
    border: 1px solid #d5f0df !important;
    border-radius: 50% !important;
    background: #e9f8ef !important;
    color: #16834a !important;
    font-size: 31px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

.csw-cart-success-dialog h2 {
    margin: 0 0 10px !important;
    padding: 0 !important;
    color: #14213b !important;
    font-size: 26px !important;
    font-weight: 750 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.5px !important;
}

.csw-cart-success-dialog p {
    margin: 0 0 26px !important;
    color: #697586 !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
}

.csw-cart-success-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
}

.csw-cart-success-actions button,
.csw-cart-success-actions a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 12px 10px !important;
    border: 1px solid #14213b !important;
    border-radius: 8px !important;
    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    text-align: center !important;
    text-decoration: none !important;
    text-transform: none !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: background-color .2s ease,
                color .2s ease,
                box-shadow .2s ease,
                transform .2s ease !important;
}

/* Continue Shopping */
.csw-cart-success-actions .csw-cart-success-continue {
    background: #fff !important;
    color: #14213b !important;
}

.csw-cart-success-actions .csw-cart-success-continue:hover {
    background: #f3f6fa !important;
    color: #14213b !important;
    box-shadow: 0 4px 12px rgba(20, 33, 59, 0.08) !important;
    transform: translateY(-1px);
}

/* Proceed to Checkout */
.csw-cart-success-actions .csw-cart-success-checkout {
    background: #14213b !important;
    color: #fff !important;
    border-color: #14213b !important;
}

.csw-cart-success-actions .csw-cart-success-checkout:hover {
    background: #263b5b !important;
    color: #fff !important;
    border-color: #263b5b !important;
    box-shadow: 0 5px 14px rgba(20, 33, 59, 0.18) !important;
    transform: translateY(-1px);
}

/* Close button */
.csw-cart-success-close {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: #788397 !important;
    font-size: 25px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: background .2s ease, color .2s ease !important;
}

.csw-cart-success-close:hover {
    background: #f0f3f7 !important;
    color: #14213b !important;
}

/* Entrance animation */
@keyframes cswPremiumModalIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile */

/* =========================================
   Compact Cart Modal — Mobile Only
========================================= */

@media (max-width: 480px) {
    .csw-cart-success-modal {
        padding: 16px !important;
    }

    .csw-cart-success-dialog {
        width: 100% !important;
        max-width: 340px !important;
        padding: 26px 18px 20px !important;
        border-radius: 15px !important;
        box-shadow: 0 16px 48px rgba(7, 18, 39, 0.22) !important;
    }

    .csw-cart-success-close {
        top: 5px !important;
        right: 5px !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 22px !important;
    }

    .csw-cart-success-icon {
        width: 46px !important;
        height: 46px !important;
        margin: 0 auto 12px !important;
        font-size: 24px !important;
    }

    .csw-cart-success-dialog h2 {
        margin-bottom: 7px !important;
        font-size: 21px !important;
        line-height: 1.3 !important;
        letter-spacing: -0.3px !important;
    }

    .csw-cart-success-dialog p {
        margin-bottom: 18px !important;
        font-size: 12px !important;
        line-height: 1.55 !important;
    }

    .csw-cart-success-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .csw-cart-success-actions button,
    .csw-cart-success-actions a {
        min-height: 42px !important;
        padding: 9px 6px !important;
        border-radius: 7px !important;
        font-size: 11px !important;
        line-height: 1.3 !important;
    }
}

/* Extra-small phones */
@media (max-width: 360px) {
    .csw-cart-success-dialog {
        max-width: 310px !important;
        padding: 24px 14px 17px !important;
    }

    .csw-cart-success-actions {
        gap: 6px !important;
    }

    .csw-cart-success-actions button,
    .csw-cart-success-actions a {
        padding: 8px 4px !important;
        font-size: 10px !important;
    }
}


@media (prefers-reduced-motion: reduce) {
    .csw-cart-success-dialog {
        animation: none !important;
    }

    .csw-cart-success-actions button,
    .csw-cart-success-actions a,
    .csw-cart-success-close {
        transition: none !important;
    }
}
