/* ==========================================================
   Webmaker Shop Style Fix
   Targets WooCommerce's own built-in classes directly, so it
   works no matter how the theme/page builder wraps things.
   Change #1e73d8 / #14528f below to match your exact brand blue.
   ========================================================== */

body.woocommerce *,
body.woocommerce-page * {
    box-sizing: border-box;
}

/* ---------- Center everything on shop/product/cart/account pages ---------- */
body.woocommerce-shop .site-content,
body.single-product .site-content,
body.woocommerce-cart .site-content,
body.woocommerce-checkout .site-content,
body.woocommerce-account .site-content,
body.woocommerce-shop #primary,
body.single-product #primary,
body.woocommerce-cart #primary,
body.woocommerce-checkout #primary,
body.woocommerce-account #primary {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px;
    padding-right: 20px;
    float: none !important;
    width: auto !important;
}

/* Fallback centering in case the theme has no #primary/.site-content at all */
ul.products,
div.product,
table.shop_table {
    max-width: 1160px;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ---------- Shop grid ---------- */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 24px !important;
    list-style: none !important;
    margin-top: 20px !important;
    padding: 0 !important;
}
ul.products li.product {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    float: none !important;
    width: auto !important;
    position: relative;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
ul.products li.product:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
ul.products li.product img {
    border-radius: 6px;
    margin-bottom: 12px;
}
ul.products li.product h2,
ul.products li.product .woocommerce-loop-product__title {
    font-size: 16px;
    margin: 8px 0 4px;
}
ul.products li.product .price {
    color: #1e73d8;
    font-weight: 600;
}
ul.products li.product .onsale {
    background: #c9a000;
    color: #fff;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    position: absolute;
    top: 12px;
    left: 12px;
}
ul.products li.product .button {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 18px;
    background: #1e73d8;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s ease;
}
ul.products li.product .button:hover {
    background: #14528f;
}

.woocommerce-ordering,
.woocommerce-result-count {
    margin: 10px 0;
}
.woocommerce-ordering select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* ---------- Single product page ---------- */
div.product {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 32px !important;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 24px;
    margin-top: 20px !important;
    float: none !important;
    width: auto !important;
}
div.product .woocommerce-product-gallery {
    flex: 1 1 320px !important;
    width: auto !important;
    float: none !important;
}
div.product .summary {
    flex: 1 1 320px !important;
    width: auto !important;
    float: none !important;
}
div.product .price {
    color: #1e73d8;
    font-size: 22px;
    font-weight: 600;
}
div.product form.cart {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}
div.product .single_add_to_cart_button {
    background: #1e73d8 !important;
    border: none;
    color: #fff !important;
    padding: 12px 26px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}
div.product .single_add_to_cart_button:hover {
    background: #14528f !important;
}
/* Description/reviews tabs sit below the flex row, full width */
div.product .woocommerce-tabs {
    flex: 1 1 100% !important;
    width: 100% !important;
    margin-top: 16px;
}
.woocommerce-tabs ul.tabs {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    border-bottom: 1px solid #e5e5e5;
}
.woocommerce-tabs ul.tabs li {
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid #e5e5e5;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    margin-right: 4px;
    background: #f7f7f7;
}
.woocommerce-tabs ul.tabs li.active {
    background: #fff;
    font-weight: 600;
}

/* ---------- Cart & checkout tables ---------- */
table.shop_table {
    width: 100% !important;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
}
table.shop_table th {
    background: #f7f7f7;
    text-align: left;
    padding: 12px 14px;
    font-size: 14px;
}
table.shop_table td {
    padding: 12px 14px;
    border-top: 1px solid #eee;
}
#place_order,
.checkout-button {
    background: #1e73d8 !important;
    color: #fff !important;
    border: none;
    padding: 12px 26px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}
#place_order:hover,
.checkout-button:hover {
    background: #14528f !important;
}

/* ---------- My Account ---------- */
body.woocommerce-account .woocommerce {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 32px !important;
    align-items: flex-start !important;
    margin-top: 20px;
}
.woocommerce-MyAccount-navigation {
    flex: 0 0 220px !important;
    width: auto !important;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 8px;
    float: none !important;
}
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.woocommerce-MyAccount-navigation li {
    border-bottom: 1px solid #f0f0f0;
    list-style: none;
}
.woocommerce-MyAccount-navigation li:last-child {
    border-bottom: none;
}
.woocommerce-MyAccount-navigation li a {
    display: block;
    padding: 10px 14px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    border-radius: 6px;
}
.woocommerce-MyAccount-navigation li a:hover {
    background: #f2f7fd;
    color: #1e73d8;
}
.woocommerce-MyAccount-navigation li.is-active a {
    background: #1e73d8;
    color: #fff;
}
.woocommerce-MyAccount-content {
    flex: 1 1 400px !important;
    width: auto !important;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 24px;
    float: none !important;
}
.woocommerce-MyAccount-content form fieldset {
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 16px;
    margin-top: 16px;
}
.woocommerce-MyAccount-content form legend {
    font-weight: 600;
    padding: 0 8px;
}
.woocommerce-MyAccount-content input[type="text"],
.woocommerce-MyAccount-content input[type="email"],
.woocommerce-MyAccount-content input[type="password"],
.woocommerce-MyAccount-content input[type="tel"],
.woocommerce-MyAccount-content select,
.woocommerce-MyAccount-content textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-top: 4px;
    margin-bottom: 14px;
    font-size: 14px;
}
.woocommerce-MyAccount-content button,
.woocommerce-MyAccount-content input[type="submit"] {
    background: #1e73d8 !important;
    color: #fff !important;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}
.woocommerce-MyAccount-content button:hover,
.woocommerce-MyAccount-content input[type="submit"]:hover {
    background: #14528f !important;
}

/* ---------- Small screens ---------- */
@media (max-width: 700px) {
    body.woocommerce-account .woocommerce {
        flex-direction: column !important;
    }
    .woocommerce-MyAccount-navigation {
        width: 100% !important;
    }
}
