/* Product Bundle Styles */
.bundle-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:32px;
    align-items:start
}

.bundle-item-card .bic-select .color-swatch .color-swatch-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: solid 2px #fff;
}


.bundle-gallery .gallery-main img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: #fff;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    border: solid 2px #f9f9f9;
}

.gallery-thumbs {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    grid-template-columns: 1fr 1fr 1fr 1fr;
}
.gallery-thumbs .thumb {
    border: 0;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
    cursor: pointer;
    flex: 1;
    border: solid 2px #f9f9f9;
    height: 110px;
}

.gallery-thumbs .thumb:hover, .gallery-thumbs:focus, button.thumb:focus {
   background: #fff;
}
.gallery-thumbs .thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


.bundle-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bundle-details .bundle-title {
    margin: 0;
    color: #000527;
    font-family: Poppins;
    font-size: 32px;
    font-style: normal;
    font-weight: 600;
    line-height: 116%;
    letter-spacing: -0.32px;
}
.bundle-details .bundle-price{
    color: #000C5E;
    font-family: Poppins;
    font-size: 32px;
    font-style: normal;
    font-weight: 600;
    line-height: 116%;
    letter-spacing: -0.32px;
}

@media(max-width: 900px){
    .bundle-grid{
        grid-template-columns:1fr
    }
}
.product-bundle {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-bundle h3 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
    border-bottom: 2px solid #000c5e;
    padding-bottom: 10px;
}

.bundle-description {
    color: #666;
    font-style: italic;
    margin-bottom: 20px;
}

.bundle-products {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.bundle-product-item {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 6px;
    background: #fafafa;
}

.bundle-product-item .product-image {
    margin-right: 15px;
    flex-shrink: 0;
}

.bundle-product-item .product-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.bundle-product-item .product-details {
    flex: 1;
}

.bundle-product-item h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 18px;
}

.bundle-product-item .product-sku {
    font-size: 12px;
    color: #888;
    margin: 4px 0;
    font-family: monospace;
}

.bundle-product-item .product-quantity {
    font-size: 14px;
    color: #666;
    margin: 4px 0;
}

.bundle-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bundle-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bundle-item-card {
    display: flex;
    padding: 12px;
    flex-direction: column;
    gap: 0px;
    align-self: stretch;
    border-radius: 8px;
    border: 1px solid rgba(0, 5, 39, 0.05);
    background: #FFF;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.08);
}

.bic-left {
    display: flex;
    gap: 16px;
}

.bic-thumb {
    width: 100px;
    height: 75px;
    display: flex;
    background: #fff;
    border: solid 2px #f9f9f9;
    border-radius: 8px;
}

.bic-thumb img {
    object-fit: contain;
}

.bic-title {
    color: #000c5e;
    font-family: Poppins;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
}

.bic-meta {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Custom select arrow for variation selects */
.bic-select {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bic-select .variation-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23000c5e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px 16px;
    border: 1px solid rgba(0, 5, 39, 0.15);
    border-radius: 8px;
    height: 40px;
}

/* Hide native arrow in IE/Edge */
.bic-select .variation-select::-ms-expand { display: none; }

.bic-select .variation-select:focus {
  outline: none;
  border-color: #000c5e;
  box-shadow: 0 0 0 3px rgba(0, 12, 94, 0.12);
}

.bic-sub {
    color: #000c5e;
    font-family: Poppins;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
}

.bic-sub .qty {     
    font-weight: 600; 
}

a.bic-more {
    font-family: Poppins;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    text-decoration-line: underline !important;
    color: #000c5e !important;
}

label.bic-label {
    color: #000c5e;
    font-family: Poppins;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    margin-top: 12px;
}



.bundle-product-item .product-price {
    font-weight: bold;
    color: #000c5e;
    margin: 8px 0;
}

.product-variations {
    margin-top: 10px;
}

.product-variations label {
    display: block;
    margin: 8px 0 4px 0;
    font-weight: 600;
    color: #333;
}

.product-variations select, .variation-select {
    width: 100%;
    border: 1px solid #000c5e;
    border-radius: 8px;
    padding: 8px 16px 8px 8px;
}

.product-variations select:focus,
.variation-select:focus {
    border-color: #000c5e;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 12, 94, 0.1);
}

.product-variations select.error,
.variation-select.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}

.variation-attribute {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.variation-attribute strong {
    margin-right: 8px;
    min-width: 80px;
    color: #333;
}

.variation-field {
    margin-bottom: 10px;
}

.variation-field label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.bundle-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 80px;
    justify-content: space-between;
}

.bundle-pricing {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #000c5e;
}

span.qty-display {
    color: #000527;
    font-family: Poppins;
    font-size: 20px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
}

.bundle-qty {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

button.js-qty-plus, button.js-qty-minus {
    border: 0;
    padding: 5px !important;
    background: #e6f2ff;
    color: #000527;
    width: 24px;
    height: 24px;
    font-size: 12px !important;
    display: flex ;
    align-items: center;
    justify-content: center;
}

button.js-qty-plus:hover, button.js-qty-minus:hover, button.js-qty-plus:focus, button.js-qty-minus:focus {
    background: #000527;
    color: #fff;
}

.bundle-pricing p {
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.original-price {
    text-decoration: line-through;
    color: #888;
}

.bundle-price {
    font-size: 18px;
    font-weight: bold;
    color: #000c5e;
}

.savings {
    color: #28a745;
    font-weight: bold;
}

.add-bundle-to-cart {
    background: #000c5e;
    color: white;
    border: none;
    padding: 12px 24px !important;
    font-size: 16px !important;
    width: 80%;
}

.add-bundle-to-cart:hover, .add-bundle-to-cart:focus {
    background: #000c5e;
    color: #fff;
}



.add-bundle-to-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

button.remove-bundle {
    border: 0;
}

button.remove-bundle:hover, button.remove-bundle:focus {
    background: none;
}

/* Bundle Messages */
.bundle-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    z-index: 9999;
    max-width: 300px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

span.bundle-vat {
    font-size: 16px;
    font-weight: 600;
}

.bundle-success {
    background: #28a745;
}

.bundle-error {
    background: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bundle-product-item {
        flex-direction: column;
        text-align: center;
    }
    
    .bundle-product-item .product-image {
        margin-right: 0;
        margin-bottom: 10px;
        align-self: center;
    }
    
    .bundle-pricing p {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .product-variations select {
        max-width: 100%;
    }

    .add-bundle-to-cart {
        width: 100%;
    }
}

/* Admin Styles */
.bundle-form {
    background: white;
    padding: 20px;
    border: 1px solid #ccd0d4;
    border-radius: 6px;
    margin-bottom: 30px;
}

.product-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.product-select {
    min-width: 300px;
}

.product-row input[name="quantities[]"] {
    width: 80px;
}

.remove-product {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.remove-product:hover {
    background: #c82333;
}

#add-product {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 20px;
}

#add-product:hover {
    background: #218838;
}

.bundles-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.bundles-table th,
.bundles-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.bundles-table th {
    background: #f8f9fa;
    font-weight: bold;
}

.bundles-table tr:hover {
    background: #f5f5f5;
}

.edit-bundle,
.delete-bundle {
    padding: 4px 8px;
    margin-right: 5px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.edit-bundle {
    background: #007cba;
    color: white;
}

.edit-bundle:hover {
    background: #005a87;
}

.delete-bundle {
    background: #dc3545;
    color: white;
}

.delete-bundle:hover {
    background: #c82333;
}

.bundles-table code {
    background: #f1f1f1;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 11px;
}

/* Bundles Grid Styles */
.bundles-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.bundles-grid.columns-1 {
    grid-template-columns: 1fr;
}

.bundles-grid.columns-2 {
    grid-template-columns: repeat(3, 1fr);
}

.bundles-grid.columns-3 {
    grid-template-columns: repeat(4, 1fr);
}

.bundles-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.bundle-card {
    border-radius: 16px;
    border: 1px solid var(--Colour-Accent-1, #F3F3F3);
    background: var(--Colour-Background, #FFF);
    box-shadow: 0 0 11px 0 rgba(0, 0, 0, 0.06);
    cursor: pointer;
}

.bundle-selection-hint {
    display: flex;
    justify-content: center;
    padding: 4px 24px;
    border-radius: 999px;
    background: rgba(238, 184, 48, 0.10);
    gap: 8px;
    color: #000527;
    font-family: Poppins;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
}

/* Color swatch next to variation selects */
.bundle-item-card .bic-select {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative; /* allow absolute swatch positioning */
}

.bundle-item-card .bic-select .color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    display: none;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    border: 2px solid #f3f3f3;
}

/* Default padding; increased when swatch present */
.bundle-item-card .bic-select select {
    padding-left: 12px;
}

.bundle-item-card .bic-select select.has-swatch {
    padding: 8px 8px 8px 50px;
}



.bundle-card .bundle-image {
    position: relative;
    overflow: hidden;
}

.bundle-card .bundle-image img {
    width: 100%;
    height: 230px;
    object-fit: contain;
    background-color: #f2f2f2;
    border-radius: 16px 16px 0 0;
}

.bundle-card .bundle-content {
    padding: 20px;
}

.bundle-card h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.3;
}

.bundle-card h3 a {
    text-decoration: none;
    color: var(--Colour-Text, #000527);
    font-family: Poppins;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
}

.bundle-card h3 a:hover {
    color: #000c5e;
}

.bundle-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.bundle-card .bundle-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.bundle-card .original-price {
    text-decoration: line-through;
    color: #888;
    font-size: 14px;
}

.bundle-card .bundle-price .bundle-price {
    font-family: Poppins;
    font-size: 20px;
    font-weight: 600;
    line-height: 120%;
}

.bundle-card .button {
    background: #000c5e;
    color: white;
    padding: 8px 16px;
    border-radius: 99px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 120%;
}



.bundle-card .button:hover {
    background: #000a4d;
    color: white;
}

/* Bundle Meta in Cart */
.bundle-meta {
    color: #666;
    font-style: italic;
    font-size: 12px;
}

.bundle-pricing-meta {
    color: #666;
    font-size: 11px;
    line-height: 1.4;
    margin-top: 2px;
    display: block;
}

.bundle-pricing-meta span {
    font-weight: bold;
}

/* Cart/Checkout bundle grouping */
tr.cart_item.bundle-row-child.bundle-row-hidden {
    display: none !important;
}

.bundle-meta .bundle-toggle {
    margin-left: 8px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    cursor: pointer;
}

.bundle-meta .bundle-toggle:hover {
    border-color: #bbb;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .bundles-grid.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .bundles-grid.columns-3,
    .bundles-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bundle-card .bundle-content {
        padding: 15px;
    }
    
    .bundle-card h3 {
        font-size: 16px;
    }

    .gallery-thumbs {
    grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .bundles-grid.columns-2,
    .bundles-grid.columns-3,
    .bundles-grid.columns-4 {
        grid-template-columns: 1fr;
    }
    
    .bundle-card .bundle-image img {
        height: 150px;
    }
}
