/**
 * Product Groups Styles
 *
 * Brand Palette
 *   Bloom     : #E4E9E1  background / off-white
 *   Sage      : #AFDABF  pastel green
 *   Mint      : #559A75  mid-green
 *   Amazon    : #306C49  primary green
 *   Deep Teal : #00372A  darkest green
 *
 * Greyscale
 *   Iron      : #D1D3D4
 *   Aluminium : #A7A9AC
 *   Stone     : #808285
 *   Nevada    : #6D6E71
 *   Thunder   : #231F20
 *
 * @package PlantCupid_WooCommerce_Sync
 */

/* ==========================================================================
   Category/Shop Page — Variation Links
   ========================================================================== */

.wc-group-product-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.wc-group-product-link {
    display: inline-block;
    padding: 6px 14px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all .2s ease;
    font-weight: 500;
}

.wc-group-product-link:hover {
    background: #E4E9E1;
    border-color: #AFDABF;
    color: #00372A;
    text-decoration: none;
}

.wc-group-product-link:active { background: #AFDABF; }

/* ==========================================================================
   Single Product Page — Variation Selector
   ========================================================================== */

/* No outer margin — spacing is controlled by the Elementor widget container */
.wc-group-product-variations {
    padding: 0;
}

.wc-group-variation {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    margin-bottom: 12px;
    background: #fff;
    border: 2px solid #AFDABF;     /* Sage — inactive border */
    border-radius: 6px;
    transition: all .2s ease;
    cursor: pointer;
}

.wc-group-variation:hover {
    border-color: #559A75;         /* Mint — hover border */
    box-shadow: 0 2px 4px rgba(0, 55, 42, .06);
}

.wc-group-variation.current {
    border-color: #559A75;
    background: #E4E9E1;
}

.wc-group-variation.current .wc-group-variation-stock {
    color: #306C49;                /* Amazon — legible on Bloom bg */
}

.wc-group-variation-radio { flex-shrink: 0; padding-right: 12px; }

.wc-group-variation-radio input[type="radio"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: #559A75;
}

.wc-group-variation-details { flex: 1; }

.wc-group-variation-details label {
    display: block;
    cursor: pointer;
    margin: 0;
}

.wc-group-variation-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #00372A;
    margin-bottom: 6px;
}

.wc-group-variation-price {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #00372A;
    margin-bottom: 4px;
}

.wc-group-variation-price del {
    color: #999;
    font-size: 14px;
    font-weight: 400;
    margin-right: 8px;
}

.wc-group-variation-price ins {
    text-decoration: none;
    color: #c0392b;
}

.wc-group-variation-stock {
    display: block;
    font-size: 13px;
    color: #6D6E71;                /* Nevada */
}


/* ==========================================================================
   Section Spacing
   ========================================================================== */

.wc-variations-container,
.wc-variations-hidden {
    margin-bottom: 12px;
}

/* ==========================================================================
   Multi-column Layout
   ========================================================================== */

.wc-layout-multi-column .wc-variations-container,
.wc-layout-multi-column .wc-variations-hidden {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.wc-layout-multi-column .wc-group-variation { margin-bottom: 0; }

/* ==========================================================================
   Show More / Show Fewer Button
   ========================================================================== */

.wc-show-more-variations {
    display: block;
    width: 100%;
    padding: 10px 20px;
    background: #E4E9E1;
    border: 1px solid #AFDABF;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #00372A;
    text-align: center;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.wc-show-more-variations:hover {
    background: #AFDABF;
    border-color: #559A75;
    color: #00372A;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .wc-group-product-links   { gap: 6px; margin-top: 10px; padding-top: 10px; }
    .wc-group-product-link    { padding: 5px 10px; font-size: 12px; }
    .wc-layout-multi-column .wc-variations-container,
    .wc-layout-multi-column .wc-variations-hidden { grid-template-columns: 1fr; }
    .wc-group-variation       { padding: 12px; margin-bottom: 10px; }
    .wc-group-variation-radio input[type="radio"] { width: 18px; height: 18px; }
    .wc-group-variation-name  { font-size: 14px; margin-bottom: 4px; }
    .wc-group-variation-price { font-size: 16px; }
    .wc-group-variation-stock { font-size: 12px; }
}

@media (max-width: 1359px) {
    .wc-group-product-link { flex: 1 1 auto; min-width: 120px; }
}

/* ==========================================================================
   Dark Mode
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .wc-group-product-links   { border-top-color: #444; }
    .wc-group-product-link    { background: #1a2e23; color: #E4E9E1; border-color: #306C49; }
    .wc-group-product-link:hover { background: #306C49; border-color: #559A75; color: #E4E9E1; }
    .wc-group-variation       { background: #1a2e23; border-color: #306C49; }
    .wc-group-variation:hover { border-color: #559A75; }
    .wc-group-variation.current { border-color: #559A75; background: #00372A; }
    .wc-group-variation-name  { color: #E4E9E1; }
    .wc-group-variation-price { color: #E4E9E1; }
    .wc-group-variation-stock  { color: #AFDABF; }
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
    .wc-group-product-links { border-top: 1px solid #000; }
    .wc-group-product-link  { border: 1px solid #000; }
    .wc-group-variation     { border: 1px solid #000; page-break-inside: avoid; }
}

/* ==========================================================================
   High Contrast
   ========================================================================== */

@media (prefers-contrast: high) {
    .wc-group-product-link { border-width: 2px; }
    .wc-group-variation    { border-width: 3px; }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.wc-group-product-link:focus,
.wc-group-variation:focus-within,
.wc-group-variation-radio input[type="radio"]:focus {
    outline: 2px solid #306C49;
    outline-offset: 2px;
}

.wc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}
