/* WooCommerce Custom Styles - Matching Blue Ring Theme */

/* --- General Variables & Reset --- */
:root {
    --br-black: #000000;
    --br-gray-dark: #111827;
    --br-gray-med: #4b5563;
    --br-gray-light: #f3f4f6;
    --br-white: #ffffff;
    --br-orange: #ff5500; /* Approximate orange from screenshot */
    --br-radius: 4px;
    --br-radius-lg: 8px;
    --br-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.woocommerce {
    font-family: var(--br-font-sans);
    color: var(--br-gray-med);
}

.woocommerce a {
    color: var(--br-black);
    text-decoration: none;
    transition: opacity 0.3s;
}

.woocommerce a:hover {
    opacity: 0.7;
}

/* --- Layout: Sidebar & Content --- */
.woocommerce-account .woocommerce {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

/* Sidebar Navigation */
.woocommerce-account .woocommerce-MyAccount-navigation {
    width: 100%;
    max-width: 200px;
    background: transparent;
    padding: 0;
    margin-bottom: 30px;
    border-radius: 0;
}

@media (min-width: 768px) {
    .woocommerce-account .woocommerce-MyAccount-navigation {
        width: 20%;
    }
    .woocommerce-account .woocommerce-MyAccount-content {
        width: 75%;
        background: transparent;
        padding: 0;
        border: none;
        border-radius: 0;
    }
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    margin-bottom: 0;
    border-bottom: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 12px 16px 12px 20px;
    color: #999; /* Gray for inactive */
    font-weight: 400;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    background: transparent;
}

/* Active State */
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    color: var(--br-black);
    font-weight: 700; /* Bold */
    border-left-color: var(--br-orange); /* Orange vertical bar */
    background: transparent;
    box-shadow: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    color: var(--br-black);
}

/* Content Area Header */
.woocommerce-account h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--br-black);
    margin-bottom: 20px;
}

/* --- Dashboard Card (Account Overview) --- */
.blue-ring-dashboard-card {
    border: 1px solid #eee;
    background: #fff;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.blue-ring-dashboard-card .user-info-row {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 20px;
}

.blue-ring-dashboard-card .user-avatar {
    width: 60px;
    height: 60px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.blue-ring-dashboard-card .user-details {
    flex: 1;
}

.blue-ring-dashboard-card .user-name {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin: 0 0 5px 0;
}

.blue-ring-dashboard-card .user-meta {
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blue-ring-dashboard-card .manage-link {
    font-size: 14px;
    color: #0070f3; /* Blue link */
    font-weight: 500;
}

/* --- Manage Account Form --- */
.woocommerce-EditAccountForm fieldset {
    margin-bottom: 20px;
    border: none;
    padding: 0;
}

.woocommerce-EditAccountForm legend {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    margin-bottom: 10px;
    display: block;
    width: 100%;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.woocommerce-EditAccountForm .form-row {
    margin-bottom: 15px;
}

.woocommerce-EditAccountForm label {
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}

.woocommerce-EditAccountForm input.input-text {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 0;
}

/* --- Buttons --- */
.woocommerce button.button, 
.woocommerce a.button, 
.woocommerce input.button,
.woocommerce #respond input#submit {
    background-color: transparent !important;
    color: #0070f3 !important; /* Blue text link style often used in these minimal designs, or black button */
    border: none !important;
    padding: 0 !important;
    font-weight: 500 !important;
    border-radius: 0 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

/* Specific button overrides for forms */
.woocommerce form button.button {
    background-color: #000 !important;
    color: #fff !important;
    padding: 10px 30px !important;
    margin-top: 10px;
    border-radius: 0 !important;
}

/* --- Orders / Empty States --- */
.woocommerce-message--info {
    background: transparent !important;
    border: none !important;
    padding: 40px 0 !important;
    text-align: center;
    color: #666 !important;
}

.woocommerce-message--info::before {
    display: none !important;
}

.woocommerce-message--info .woocommerce-Button {
    display: inline-block;
    margin-top: 10px;
    background: #000 !important;
    color: #fff !important;
    padding: 8px 20px !important;
    border-radius: 0 !important;
}

/* --- Login/Register --- */
#customer_login {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 768px) {
    #customer_login {
        grid-template-columns: 1fr 1fr;
    }
    
    #customer_login .u-column1,
    #customer_login .u-column2 {
        padding: 30px;
        border: 1px solid #eee;
    }
}

.br-shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
}

.br-shop-sidebar-title {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin-bottom: 18px;
}

.br-shop-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.br-shop-category-list li {
    margin: 0;
    border-bottom: 1px solid #f3f4f6;
}

.br-shop-category-list li a {
    display: block;
    padding: 12px 4px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.br-shop-category-list li.current-cat > a,
.br-shop-category-list li a:hover {
    color: #000;
}

.br-shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
}

.br-shop-toolbar .woocommerce-result-count {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

.br-shop-toolbar .woocommerce-ordering {
    margin: 0;
}

.br-shop-toolbar .orderby {
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 13px;
    background: #fff;
}

.br-shop-products ul.products {
    opacity: 1;
    transition: opacity .25s ease;
}

.br-shop-products.br-products-hidden ul.products {
    opacity: 0;
}

.br-shop-skeleton {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.br-skeleton-card {
    height: 320px;
    border-radius: 12px;
    background: linear-gradient(100deg, #f3f4f6 30%, #e5e7eb 40%, #f3f4f6 50%);
    background-size: 200% 100%;
    animation: br-skeleton-loading 1.1s infinite linear;
}

.br-shop-skeleton.is-hidden {
    display: none;
}

@keyframes br-skeleton-loading {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

@media (max-width: 1023px) {
    .br-shop-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .br-shop-skeleton {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* --- Product Card Styles (Custom) --- */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin: 0;
}

/* Reset default li styles */
.woocommerce ul.products li.product {
    float: none;
    margin: 0;
    width: auto;
    padding: 0;
    position: relative;
    background: transparent;
}

.br-product-card {
    background-color: #f8f9fb; /* Light gray background */
    border-radius: 12px;
    padding: 24px;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.br-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.br-product-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.br-product-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    z-index: 2;
    position: relative;
}

.br-product-title {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    margin: 0;
    line-height: 1.4;
    padding: 0;
}

.br-product-title a {
    color: inherit;
    text-decoration: none;
}

.br-product-badge {
    background-color: #ffecec;
    color: #ff4d4f;
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.br-product-image-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.br-product-image-wrapper img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply; /* Helps blend white bg images into light gray card */
}

.br-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    position: relative;
    z-index: 2;
}

.br-product-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Override default price styling */
.br-product-price .price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: #000;
    font-weight: 600;
    font-size: 18px;
}

.br-product-price del {
    color: #999;
    font-weight: 400;
    font-size: 14px;
    text-decoration: line-through;
    opacity: 0.8;
    order: 2; /* Put original price after sale price if flex order used, or just natural flow */
}

.br-product-price ins {
    text-decoration: none;
    color: #000;
    background: transparent;
    font-weight: 600;
    order: 1;
}

/* Handle simple price (no sale) */
.br-product-price .amount {
    color: #000;
}

/* Add to cart button */
.br-add-to-cart-wrapper {
    display: flex;
}

.br-add-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    color: #333 !important;
    cursor: pointer;
    border-radius: 50% !important;
    transition: background 0.2s;
}

.br-add-btn:hover {
    background-color: rgba(0,0,0,0.05) !important;
    color: #000 !important;
}

.br-add-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2px;
}

/* Responsive Grid */
@media (max-width: 1200px) {
    .woocommerce ul.products,
    .br-shop-skeleton {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .woocommerce ul.products,
    .br-shop-skeleton {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
    
    .br-product-card {
        padding: 16px;
    }
    
    .br-product-title {
        font-size: 14px;
    }
    
    .br-product-price .price {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .woocommerce ul.products,
    .br-shop-skeleton {
        grid-template-columns: 1fr;
    }
}

/* --- Single Product Page Styles --- */

/* Wrapper & Layout */
.single-product .product {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin: 40px auto;
    max-width: 1200px;
    padding: 0 20px;
}

@media (min-width: 992px) {
    .single-product .product {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
        align-items: start;
    }
}

/* Left Column: Gallery */
.single-product .woocommerce-product-gallery {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
}

.single-product .woocommerce-product-gallery .flex-control-nav {
    margin-top: 20px;
}

/* Right Column: Summary */
.single-product .summary {
    float: none !important;
    width: 100% !important;
    display: flex;
    flex-direction: column;
}

/* Product Title */
.single-product .product_title {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    margin-bottom: 20px;
    line-height: 1.2;
}

/* Short Description */
.single-product .woocommerce-product-details__short-description {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.single-product .woocommerce-product-details__short-description ul {
    padding-left: 20px;
    margin-bottom: 10px;
}

/* Variations Form */
.single-product form.cart {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.single-product .variations {
    width: 100%;
    margin-bottom: 20px;
    border: none;
}

.single-product .variations tr {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.single-product .variations td.label {
    padding: 0;
    margin-bottom: 8px;
    color: #000;
    font-weight: 600;
    font-size: 14px;
    text-align: left;
}

.single-product .variations td.value {
    padding: 0;
}

.single-product .variations select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background-color: #fff;
    cursor: pointer;
}

/* Quantity & Add to Cart Row */
.single-product .quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 999px; /* Pill shape */
    padding: 4px;
    margin-right: 20px;
    background: #fff;
}

.single-product .quantity .qty {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 16px;
    padding: 0;
    -moz-appearance: textfield;
}

.single-product .quantity .qty::-webkit-outer-spin-button,
.single-product .quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Add to Cart Button */
.single-product .single_add_to_cart_button {
    background-color: #ffe600 !important; /* Yellow from reference */
    color: #000 !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    padding: 14px 40px !important;
    border-radius: 999px !important; /* Pill shape */
    border: none !important;
    flex-grow: 1;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
    max-width: 300px;
}

.single-product .single_add_to_cart_button:hover {
    background-color: #e6cf00 !important;
}

/* Price */
.single-product .price {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #000 !important;
    margin-bottom: 20px !important;
    display: block;
}

/* Meta info (SKU, Category) */
.single-product .product_meta {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #999;
}

.single-product .product_meta > span {
    display: block;
    margin-bottom: 5px;
}

.single-product .product_meta a {
    color: #666;
    font-weight: 500;
}

/* Tabs (Description, Reviews) */
.single-product .woocommerce-tabs {
    margin-top: 60px;
    clear: both;
}

.single-product .woocommerce-tabs ul.tabs {
    padding: 0;
    margin: 0 0 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 30px;
}

.single-product .woocommerce-tabs ul.tabs li {
    background: transparent;
    border: none;
    margin: 0;
    padding: 0;
}

.single-product .woocommerce-tabs ul.tabs li::before,
.single-product .woocommerce-tabs ul.tabs li::after {
    display: none;
}

.single-product .woocommerce-tabs ul.tabs li a {
    padding: 0 0 15px;
    color: #666;
    font-weight: 500;
    font-size: 16px;
    border-bottom: 2px solid transparent;
    display: inline-block;
}

.single-product .woocommerce-tabs ul.tabs li.active a {
    color: #000;
    border-bottom-color: #000;
}

.single-product .woocommerce-Tabs-panel {
    color: #444;
    line-height: 1.8;
    font-size: 15px;
}
