/* ────────────────────────────────────────────
   WooCommerce — iiREDA Theme Overrides
   Styles for native WC output on cart, checkout,
   myaccount, and miscellaneous WC pages.
──────────────────────────────────────────── */

/* ── Generic WC page wrapper ── */
.woo-page-wrap {
    padding: var(--sp-section, 4rem) 0;
}
.woo-page-wrap__inner {
    max-width: var(--shell, 1280px);
    margin-inline: auto;
    padding-inline: var(--gutter, 1.5rem);
}

/* ── WC Notices ── */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    border-left: 4px solid transparent;
}
.woocommerce-message { background: #ecfdf5; border-color: #10b981; color: #065f46; }
.woocommerce-info    { background: #eff6ff; border-color: #3b82f6; color: #1e40af; }
.woocommerce-error   { background: #fef2f2; border-color: #ef4444; color: #991b1b; }
.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a { color: inherit; text-decoration: underline; }

/* ── My Account — dashboard layout ── */
.account-section--dashboard .account-section__shell {
    padding-block: 3rem 4rem;
}
.account-dashboard {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: start;
}
/* WooCommerce layout.css floats 30%/68% — breaks our grid and pushes inline links */
.account-dashboard .woocommerce-MyAccount-navigation,
.account-dashboard .woocommerce-MyAccount-content {
    float: none !important;
    width: 100% !important;
}
@media (max-width: 900px) {
    .account-dashboard { grid-template-columns: 1fr; }
    .account-dashboard__nav { display: none; }
}

/* WC native wrapper inside dashboard */
.woocommerce-account .woocommerce {
    display: contents; /* let our grid handle layout */
}
@media (max-width: 900px) {
    .woocommerce-account .woocommerce { display: block; }
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--color-card, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 10px;
    overflow: hidden;
}
.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text, #1a1f2e);
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    transition: background 0.15s;
    text-decoration: none;
}
.woocommerce-MyAccount-navigation ul li a:hover,
.woocommerce-MyAccount-navigation ul li.is-active a {
    background: var(--color-primary, #1a3a5c);
    color: #fff;
}
.woocommerce-MyAccount-navigation ul li:last-child a { border-bottom: none; }

.woocommerce-MyAccount-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.account-section .woocommerce-MyAccount-content {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #374151;
}
.account-section .woocommerce-MyAccount-content a {
    color: #3d9cf5;
    text-decoration: none;
}
.account-section .woocommerce-MyAccount-content a:hover {
    text-decoration: underline;
}

/* ── Orders table ── */
.woocommerce-orders-table,
.woocommerce table.shop_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.woocommerce-orders-table th,
.woocommerce table.shop_table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    background: var(--color-bg-alt, #f8f9fb);
    border-bottom: 2px solid var(--color-border, #e5e7eb);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.woocommerce-orders-table td,
.woocommerce table.shop_table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    vertical-align: middle;
}

/* ── Form fields (WC native) ── */
.woocommerce-page .woocommerce-Input,
.woocommerce-page .input-text,
.woocommerce-page select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--color-border, #d1d5db);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: #fff;
    color: var(--color-text, #1a1f2e);
    transition: border-color 0.2s;
}
.woocommerce-page .input-text:focus,
.woocommerce-page select:focus {
    border-color: var(--color-primary, #1a3a5c);
    outline: none;
}

/* ── Buttons ── */
.woocommerce-page .button,
.woocommerce-page button[type="submit"],
.woocommerce #respond input#submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--color-primary, #1a3a5c);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    text-decoration: none;
}
.woocommerce-page .button:hover,
.woocommerce-page button[type="submit"]:hover {
    background: var(--color-primary-dark, #0f2540);
    transform: translateY(-1px);
}
.woocommerce-page .button.alt {
    background: var(--color-accent, #e63a2e);
}

/* ── WC Rating stars ── */
.star-rating { display: none; } /* we use our own star render in templates */

/* ── Password strength meter ── */
.woocommerce-password-strength {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    margin-top: 0.4rem;
}
.woocommerce-password-strength.strong { background: #d1fae5; color: #065f46; }
.woocommerce-password-strength.good   { background: #fef3c7; color: #92400e; }
.woocommerce-password-strength.short  { background: #fee2e2; color: #991b1b; }

/* ── Order received / thank you page (account endpoint) ── */
.woocommerce-order {
    font-size: 0.9rem;
    color: #1f2937;
}
.woocommerce-order p,
.woocommerce-order li,
.woocommerce-order td,
.woocommerce-order th,
.woocommerce-order address {
    color: #1f2937;
}
.woocommerce-order h1,
.woocommerce-order h2,
.woocommerce-order h3,
.woocommerce-order strong,
.woocommerce-order b,
.woocommerce-order .woocommerce-order-details__title,
.woocommerce-order .woocommerce-column__title,
.woocommerce-order .wc-bacs-bank-details-heading,
.woocommerce-order .wc-bacs-bank-details-account-name {
    color: #0a2438;
}
.woocommerce-order a {
    color: #0a2438;
    text-decoration-color: rgba(10, 36, 56, 0.45);
}
.woocommerce-order ul.order_details { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: 1rem; }
.woocommerce-order ul.order_details li { background: var(--color-bg-alt, #f8f9fb); padding: 0.75rem 1rem; border-radius: 8px; }
.woocommerce-order ul.order_details li strong { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem; opacity: 0.65; }

/* ── Ajax add to cart feedback ── */
.added_to_cart { font-size: 0.875rem; }
.ajax-loading { opacity: 0.6; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .woocommerce-orders-table, .woocommerce table.shop_table { font-size: 0.8rem; }
    .woocommerce-orders-table td, .woocommerce table.shop_table td { padding: 0.5rem; }
}
