/* ============================================================
   IPKey SaaS Dashboard - Custom CSS
   Supplements Tailwind for WooCommerce-specific styling
   ============================================================ */

/* ---- Global ---- */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Sidebar scrollbar */
#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
}

/* ---- Line Clamp ---- */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- WooCommerce Overrides ---- */

/* Product Cards on shop page */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    padding: 0;
    margin: 0;
}

.woocommerce ul.products li.product {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 1rem;
    padding: 1.25rem;
    margin: 0 !important;
    width: 100% !important;
    float: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.woocommerce ul.products li.product:hover {
    box-shadow: 0 10px 40px rgba(37,99,235,0.08);
    border-color: rgba(37,99,235,0.15);
    transform: translateY(-2px);
}

.woocommerce ul.products li.product a img {
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    padding: 0;
}

.woocommerce ul.products li.product .price {
    color: #2563eb;
    font-weight: 700;
    font-size: 1.25rem;
}
.woocommerce ul.products li.product .price del {
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 400;
}
.woocommerce ul.products li.product .price ins {
    text-decoration: none;
    color: #2563eb;
}

/* Add to Cart Button */
.woocommerce ul.products li.product .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .woocommerce-message a.button {
    background-color: #2563eb !important;
    color: white !important;
    border: none !important;
    border-radius: 0.75rem !important;
    padding: 0.625rem 1.25rem !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 14px rgba(37,99,235,0.25) !important;
}
.woocommerce ul.products li.product .button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
    background-color: #1d4ed8 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37,99,235,0.35) !important;
}

/* Alt buttons */
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt {
    background-color: #2563eb !important;
}
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
    background-color: #1d4ed8 !important;
}

/* ---- Checkout Page ---- */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
.woocommerce-checkout .woocommerce-additional-fields {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #f1f5f9;
    margin-bottom: 1.5rem;
}

.woocommerce form .form-row label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    border: 1px solid #e5e7eb !important;
    border-radius: 0.75rem !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease;
    background-color: #fafafa;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1) !important;
    outline: none;
    background-color: white;
}

/* Order Review Table */
.woocommerce-checkout-review-order-table {
    border-radius: 1rem !important;
    overflow: hidden;
    border: 1px solid #f1f5f9 !important;
}
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    border-color: #f1f5f9 !important;
    padding: 1rem !important;
}
.woocommerce-checkout-review-order-table thead th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

/* Place Order Button */
.woocommerce #place_order {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    border-radius: 0.75rem !important;
    padding: 1rem 2rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    box-shadow: 0 8px 25px rgba(37,99,235,0.3) !important;
    width: 100%;
}
.woocommerce #place_order:hover {
    box-shadow: 0 12px 35px rgba(37,99,235,0.4) !important;
    transform: translateY(-2px);
}

/* ---- SePAY QR Styling ---- */
.woocommerce-order-received .woocommerce-order {
    text-align: center;
}

/* ---- WooCommerce Notices ---- */
.woocommerce-message,
.woocommerce-info {
    border-top-color: #2563eb !important;
    background-color: #eff6ff;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
}
.woocommerce-error {
    border-top-color: #ef4444 !important;
    background-color: #fef2f2;
    border-radius: 0.75rem;
}
.woocommerce-message::before,
.woocommerce-info::before {
    color: #2563eb !important;
}

/* ---- Onsale Badge ---- */
.woocommerce span.onsale {
    background-color: #ef4444 !important;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.75rem;
    min-height: auto;
    min-width: auto;
    line-height: 1;
    padding: 0.375rem 0.75rem;
}

/* ---- My Account Page ---- */
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
}
.woocommerce-MyAccount-navigation ul li {
    margin-bottom: 0.25rem;
}
.woocommerce-MyAccount-navigation ul li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    color: #4b5563;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}
.woocommerce-MyAccount-navigation ul li a:hover {
    background: #eff6ff;
    color: #2563eb;
}
.woocommerce-MyAccount-navigation ul li.is-active a {
    background: #2563eb;
    color: white;
}

/* ---- Cart page ---- */
.woocommerce-cart table.cart {
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #f1f5f9;
}
.woocommerce-cart table.cart th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.875rem;
}
.woocommerce-cart table.cart td {
    border-color: #f1f5f9;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.ipkey-wc-content,
.ipkey-woocommerce-wrap {
    animation: fadeInUp 0.4s ease-out;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr !important;
    }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ---- Force Hide Legacy Footers (Astra / Elementor / Theme Builder) ---- */
footer.site-footer,
.ast-footer-overlay,
.elementor-location-footer,
#colophon,
.ast-builder-footer-grid,
.site-below-footer-wrap {
    display: none !important;
}

