/* Estilos para páginas do WooCommerce */

/* Página Genérica */
.page-section {
    padding: 4rem 0;
    min-height: 60vh;
}

.entry-content {
    color: hsl(var(--foreground));
    line-height: 1.8;
    margin-top: 2rem;
}

.entry-content p {
    margin-bottom: 1rem;
}

.entry-content h2,
.entry-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: hsl(var(--primary));
}

/* Carrinho */
.cart-section {
    padding: 4rem 0;
    min-height: 60vh;
}

.woocommerce-cart-form {
    background-color: hsl(var(--card));
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.shop_table {
    width: 100%;
    border-collapse: collapse;
    color: hsl(var(--foreground));
}

.shop_table thead {
    background-color: rgba(255, 255, 255, 0.05);
}

.shop_table th,
.shop_table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid hsl(var(--border));
}

.shop_table img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius);
}

.product-remove a {
    color: #ef4444;
    font-size: 1.5rem;
    text-decoration: none;
    font-weight: bold;
}

.product-remove a:hover {
    color: #dc2626;
}

.product-name a {
    color: hsl(var(--foreground));
    text-decoration: none;
    font-weight: 600;
}

.product-name a:hover {
    color: hsl(var(--primary));
}

.product-quantity input {
    width: 80px;
    padding: 0.5rem;
    background-color: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    color: hsl(var(--foreground));
    text-align: center;
}

.actions button {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.actions button:hover {
    background-color: hsl(142 76% 30%);
}

/* Cart Totals */
.cart-collaterals {
    display: flex;
    justify-content: flex-end;
    margin-top: 2rem;
}

.cart-totals {
    background-color: hsl(var(--card));
    padding: 2rem;
    border-radius: var(--radius);
    min-width: 400px;
}

.cart-totals h2 {
    color: hsl(var(--foreground));
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.cart-totals table {
    width: 100%;
    margin-bottom: 1.5rem;
}

.cart-totals th,
.cart-totals td {
    padding: 0.75rem 0;
    border-bottom: 1px solid hsl(var(--border));
}

.cart-totals .order-total th,
.cart-totals .order-total td {
    font-size: 1.25rem;
    font-weight: 700;
    color: hsl(var(--primary));
}

.wc-proceed-to-checkout a {
    display: block;
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    padding: 1rem;
    text-align: center;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.wc-proceed-to-checkout a:hover {
    background-color: hsl(142 76% 30%);
    transform: translateY(-2px);
}

/* Checkout */
.woocommerce-checkout {
    padding: 4rem 0;
}

.woocommerce-checkout .col2-set {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.woocommerce-billing-fields,
.woocommerce-shipping-fields {
    background-color: hsl(var(--card));
    padding: 2rem;
    border-radius: var(--radius);
}

.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3 {
    color: hsl(var(--foreground));
    margin-bottom: 1.5rem;
}

.form-row {
    margin-bottom: 1.5rem;
}

.form-row label {
    display: block;
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground));
    font-weight: 500;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: #1a1a1a;
    border: 2px solid #333333;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
    color: #888888;
}

.form-row input:hover,
.form-row select:hover,
.form-row textarea:hover {
    border-color: var(--section-divider, #22c55e);
    background-color: #0a0a0a;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--section-divider, #22c55e);
    background-color: #0a0a0a;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-row select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' 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 0.75rem center;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.form-row select option {
    background-color: #ffffff;
    color: #000000;
    padding: 0.75rem;
}

.form-row select option:checked {
    background-color: #252525;
    color: var(--section-divider, #22c55e);
}

/* Removed duplicate focus styles */

/* Minha Conta */
.woocommerce-account {
    padding: 4rem 0;
}

.woocommerce-MyAccount-navigation {
    background-color: hsl(var(--card));
    padding: 2rem;
    border-radius: var(--radius);
}

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

.woocommerce-MyAccount-navigation li {
    margin-bottom: 0.5rem;
}

.woocommerce-MyAccount-navigation a {
    display: block;
    padding: 0.75rem 1rem;
    color: hsl(var(--foreground));
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.3s;
}

.woocommerce-MyAccount-navigation a:hover,
.woocommerce-MyAccount-navigation .is-active a {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.woocommerce-MyAccount-content {
    background-color: hsl(var(--card));
    padding: 2rem;
    border-radius: var(--radius);
}

/* Responsivo */
@media (max-width: 768px) {
    .shop_table thead {
        display: none;
    }
    
    .shop_table,
    .shop_table tbody,
    .shop_table tr,
    .shop_table td {
        display: block;
        width: 100%;
    }
    
    .shop_table tr {
        margin-bottom: 2rem;
        background-color: hsl(var(--card));
        padding: 1rem;
        border-radius: var(--radius);
    }
    
    .shop_table td {
        text-align: right;
        padding: 0.5rem 0;
        border: none;
    }
    
    .shop_table td:before {
        content: attr(data-title);
        float: left;
        font-weight: bold;
    }
    
    .cart-totals {
        min-width: 100%;
    }
    
    .woocommerce-checkout .col2-set {
        grid-template-columns: 1fr;
    }
}

/* Empty Cart */
.cart-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: hsl(var(--foreground));
    opacity: 0.7;
}

.return-to-shop {
    text-align: center;
    margin-top: 2rem;
}

.return-to-shop a {
    display: inline-block;
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.return-to-shop a:hover {
    background-color: hsl(142 76% 30%);
    transform: translateY(-2px);
}

/* Shop Layout with Sidebar */
.shop-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.shop-sidebar {
    background: hsl(var(--card));
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 2px dashed hsl(var(--border-green));
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-filters {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.filter-group {
    border-bottom: 1px solid hsl(var(--border));
    padding-bottom: 1.5rem;
}

.filter-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: hsl(var(--foreground));
}

.filter-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-item {
    display: block;
    padding: 0.75rem;
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    text-decoration: none;
    color: hsl(var(--foreground));
    transition: all 0.3s;
    font-size: 0.9rem;
}

.filter-item:hover,
.filter-item.active {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
}

.shop-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Responsive */
@media (max-width: 992px) {
    .shop-wrapper {
        grid-template-columns: 200px 1fr;
        gap: 1.5rem;
    }
    
    .shop-sidebar {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .shop-wrapper {
        grid-template-columns: 1fr;
    }
    
    .shop-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
    
    .sidebar-filters {
        gap: 1.5rem;
    }
    
    .filter-group {
        padding-bottom: 1rem;
    }
}


/* Filter Accordion Mobile Styles */
.filter-content {
    max-height: 1000px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.filter-content.collapsed {
    max-height: 0;
    opacity: 0;
}

.filter-toggle {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: hsl(var(--card));
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.filter-toggle:hover {
    background: hsl(var(--card) / 0.9);
}

.filter-toggle::after {
    content: '';
    display: none;
}

@media (max-width: 768px) {
    .filter-content {
        max-height: 0;
        opacity: 0;
    }
    
    .filter-content.open {
        max-height: 1000px;
        opacity: 1;
    }
    
    .filter-toggle {
        background: hsl(var(--card));
        border: 1px solid hsl(var(--border));
    }
    
    .filter-toggle.open {
        background: hsl(var(--card) / 0.9);
    }
    
    .filter-toggle::after {
        content: 'v';
        display: inline-block;
        transition: transform 0.3s ease;
        font-size: 0.75rem;
        margin-left: 0.5rem;
    }
    
    .filter-toggle.open::after {
        transform: rotate(180deg);
    }
}

@media (min-width: 769px) {
    .filter-content {
        max-height: 1000px !important;
        opacity: 1 !important;
    }
    
    .filter-toggle::after {
        display: none !important;
    }
}


/* Garantir que filtro de preço apareça */
#price-content {
    display: flex !important;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 1000px !important;
    opacity: 1 !important;
}

#price-content .filter-item {
    display: block !important;
}
