/*
Theme Name: Parcel Selector
Theme URI: https://parcelselector.com
Author: ParcelSelector.com
Author URI: https://parcelselector.com
Description: Motyw WordPress dla ParcelSelector.com — wtyczka InPost do WooCommerce. Bez API, bez umowy, 12 krajów EU. Tailwind CSS powered.
Version: 3.1.0
Requires at least: 5.0
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: parcel-selector-theme
Tags: one-column, custom-colors, custom-menu, featured-images, full-width-template
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700;900&display=swap');

:root {
    --ps-orange: #f97316;
    --ps-orange-hover: #ea580c;
    --ps-amber-light: #fffbeb;
    --ps-amber-soft: #fef3c7;
    --ps-gray-dark: #111827;
    --ps-radius: 2rem;
    --ps-shadow: 0 25px 50px -12px rgba(249, 115, 22, 0.15);
}

body {
    font-family: 'Outfit', sans-serif !important;
    background-color: #fff;
    color: var(--ps-gray-dark);
}

/* ══════════════════════════════════════════════════════════════
   WooCommerce Global Candy Styles
   ══════════════════════════════════════════════════════════════ */

.woocommerce-cart .entry-header,
.woocommerce-checkout .entry-header {
    text-align: center;
    padding: 2rem 0 1rem; /* Slashed from 6rem */
    background: linear-gradient(to bottom, #fff7ed, #fff);
}

.woocommerce-cart .entry-title,
.woocommerce-checkout .entry-title {
    font-size: 4rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    color: var(--ps-gray-dark);
}

/* Buttons */
.woocommerce button.button,
.woocommerce a.button,
.woocommerce .cart-collaterals .checkout-button {
    background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%) !important;
    color: #fff !important;
    border-radius: 100px !important;
    padding: 1.2rem 2.5rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border: none !important;
    box-shadow: 0 10px 20px -5px rgba(249, 115, 22, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.woocommerce button.button:hover,
.woocommerce a.button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 15px 30px -5px rgba(249, 115, 22, 0.6) !important;
    filter: brightness(1.1);
}

/* Secondary Buttons (Update Cart, Coupons) */
.woocommerce button.button.alt,
.woocommerce button.button:disabled {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    box-shadow: none !important;
}

.woocommerce .coupon .button {
    background: var(--ps-gray-dark) !important;
    color: #fff !important;
}

/* ══════════════════════════════════════════════════════════════
   Cart Page
   ══════════════════════════════════════════════════════════════ */

.woocommerce-cart-form {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border-radius: var(--ps-radius);
    padding: 2rem;
    box-shadow: var(--ps-shadow);
    border: 1px solid #fed7aa;
}

.shop_table.cart {
    border: none !important;
    border-radius: 0 !important;
}

.shop_table.cart thead {
    background: #fff7ed;
}

.shop_table.cart thead th {
    padding: 1.5rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.1em !important;
    color: #ea580c !important;
    border-bottom: 2px solid #fed7aa !important;
}

.shop_table.cart td {
    padding: 2rem 1.5rem !important;
    border-top: 1px solid #fff7ed !important;
}

.cart_item:hover {
    background-color: #fffaf5;
}

.product-name a {
    font-weight: 700 !important;
    color: var(--ps-gray-dark) !important;
    text-decoration: none !important;
    font-size: 1.2rem;
}

/* Cart Totals (Golden Ratio alignment) */
.cart-collaterals {
    display: flex;
    justify-content: flex-end;
    margin-top: 4rem;
}

.cart_totals {
    width: 38.2% !important; /* Golden Ratio */
    background: #fff7ed;
    padding: 3rem !important;
    border-radius: var(--ps-radius) !important;
    border: 2px solid #fed7aa !important;
    box-shadow: var(--ps-shadow);
}

.cart_totals h2 {
    font-weight: 900 !important;
    text-transform: uppercase !important;
    font-size: 1.5rem !important;
    margin-bottom: 2rem !important;
    border-bottom: 2px solid #fed7aa;
    padding-bottom: 1rem;
}

/* ══════════════════════════════════════════════════════════════
   Checkout Page Layout (Golden Ratio via CSS Grid)
   ══════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════
   Checkout Page Layout - Absolute Symmetry 10/10
   ══════════════════════════════════════════════════════════════ */
.ps-checkout-wrapper {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    background: linear-gradient(135deg, #fff 0%, #fff7ed 50%, #fffbeb 100%) !important;
    overflow: hidden !important;
}

.ps-checkout-container {
    max-width: 1540px !important;
    margin: 0 auto !important;
    padding: 2rem 2rem 10rem !important;
}

form.checkout.woocommerce-checkout {
    display: grid !important;
    grid-template-columns: 1.15fr 0.85fr !important;
    column-gap: 6rem !important;
    row-gap: 0 !important;
    align-items: start !important;
}

/* Unleash the Grid Children */
.woocommerce-checkout .col2-set,
.woocommerce-checkout .col-1,
.woocommerce-billing-fields {
    display: contents !important;
}

/* ROW 1: Naked Titles */
.woocommerce-billing-fields h3,
#order_review_heading {
    grid-row: 1 !important;
    margin: 0 0 2.5rem 0 !important;
    font-size: 1.5rem !important;
    font-weight: 950 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    color: var(--ps-gray-dark);
}

.woocommerce-billing-fields h3 { grid-column: 1 !important; }
#order_review_heading { grid-column: 2 !important; }

/* ROW 2: Symmetrical Candy Cards */
.woocommerce-billing-fields__field-wrapper,
#order_review {
    grid-row: 2 !important;
    background: #fff7ed !important;
    padding: 3.5rem !important;
    border-radius: var(--ps-radius) !important;
    border: 2px solid #fed7aa !important;
    box-shadow: var(--ps-shadow) !important;
    box-sizing: border-box !important;
    min-height: 500px; /* Aligns them even if content is short */
}

.woocommerce-billing-fields__field-wrapper { grid-column: 1 !important; }
#order_review { grid-column: 2 !important; }

/* Product Item Spacing for Huge Mascot */
.woocommerce-checkout-review-order-table tr {
    display: table-row !important;
}
.woocommerce-checkout-review-order-table td {
    padding: 1.5rem 0 !important;
}

/* Headers inside cards */
.woocommerce-billing-fields h3,
#order_review_heading {
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    color: var(--ps-gray-dark);
    font-size: 1.4rem !important;
    margin: 0 0 3rem 0 !important;
}

/* Input Fields */
.woocommerce-checkout input.input-text,
.woocommerce-checkout textarea,
.select2-container--default .select2-selection--single {
    background-color: #fff9f5 !important;
    border: 2px solid #fed7aa !important;
    border-radius: 1rem !important;
    padding: 0.8rem 1.5rem !important;
    height: auto !important;
    font-weight: 500 !important;
    transition: all 0.2s !important;
}

.woocommerce-checkout input.input-text:focus {
    border-color: var(--ps-orange) !important;
    outline: none !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1) !important;
}

#order_review {
    background: #fff7ed;
    padding: 3rem;
    border-radius: var(--ps-radius);
    border: 2px solid #fed7aa;
    box-shadow: var(--ps-shadow);
}

/* Form Headings Alignment */
h3#ship-to-different-address,
.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3,
#order_review_heading {
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--ps-gray-dark);
    font-size: 1.4rem !important;
}

/* Specific positioning for form headings inside cards */
.woocommerce-billing-fields h3 {
    margin-bottom: 2rem !important;
}

/* Table Polish - Final 10/10 Cleanup */
.woocommerce-checkout-review-order-table {
    border: none !important;
    margin: 0 !important;
    width: 100% !important;
    border-collapse: collapse !important;
}

.woocommerce-checkout-review-order-table thead th {
    border: none !important;
    border-bottom: 2px solid #fed7aa !important;
    padding: 0 0 1.2rem 0 !important;
    color: #ea580c !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.12em !important;
}

.woocommerce-checkout-review-order-table td, 
.woocommerce-checkout-review-order-table th {
    border: none !important;
    padding: 2rem 0 !important;
    background: transparent !important;
}

.woocommerce-checkout-review-order-table tr {
    border-bottom: 1px solid rgba(254, 215, 170, 0.4) !important;
}

.woocommerce-checkout-review-order-table .order-total {
    border-bottom: none !important;
}

.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
    padding-top: 2rem !important;
    font-size: 1.6rem !important;
    color: var(--ps-orange) !important; /* Make total pop */
    font-weight: 900 !important;
}

/* Messages / Notices & Coupon Form */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
    border-top-color: var(--ps-orange) !important;
    background-color: #fff !important;
    color: var(--ps-gray-dark) !important;
    border-radius: 1rem !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
    padding: 1.5rem 2rem 1.5rem 4rem !important;
    margin-bottom: 3rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.woocommerce-message::before, .woocommerce-info::before {
    color: var(--ps-orange) !important;
}

/* Premium Coupon Form */
/* Premium Coupon Form - Centered at the bottom */
/* Ultimate Premium Buttons */
button#place_order,
.woocommerce-checkout .button,
form.checkout_coupon button.button {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    color: #fff !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    padding: 1.8rem 4rem !important;
    border-radius: 100px !important;
    border: none !important;
    box-shadow: 0 15px 35px rgba(249, 115, 22, 0.4) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    display: inline-block !important;
    width: auto !important;
}

button#place_order:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 45px rgba(249, 115, 22, 0.5) !important;
    filter: brightness(1.1);
}

#place_order {
    width: 100% !important; /* Final button should be prominent */
    margin-top: 2rem !important;
}

.woocommerce-form-coupon-toggle .woocommerce-info {
    display: inline-block !important;
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    font-size: 0.9rem !important;
    padding: 0 !important;
}

.woocommerce-form-coupon-toggle .woocommerce-info a {
    color: var(--ps-orange) !important;
    font-weight: 700;
    text-decoration: underline;
}

.ps-benefit-notes label {
    font-weight: 800 !important;
    color: var(--ps-orange) !important;
    font-size: 1.2rem !important;
}

.ps-benefit-notes textarea {
    min-height: 250px !important; /* SPORO MIEJSCA */
    border: 2px solid var(--ps-orange) !important;
    background: #fff9f5 !important;
    font-size: 1.1rem !important;
}

.ps-collab-card {
    background: #fff;
    border-radius: 2.5rem;
    border: 2px solid #fed7aa;
    overflow: hidden;
    box-shadow: 0 30px 60px -12px rgba(249, 115, 22, 0.15);
    margin: 0 !important;
    width: 100% !important;
}

.ps-collab-header {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    padding: 3rem 2rem;
    text-align: center;
    color: #fff;
}

.ps-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 0.4rem 1.2rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 900;
    margin-bottom: 1rem;
    border: 1px solid rgba(255,255,255,0.3);
}

.ps-collab-header h3 {
    color: #fff !important;
    margin: 0 0 0.5rem 0 !important;
    font-size: 1.8rem !important;
    font-weight: 900 !important;
    line-height: 1.1;
}

.ps-collab-body {
    padding: 3rem;
}

.ps-collab-check {
    margin-bottom: 1.5rem !important;
    padding: 1.5rem !important;
    background: #fff;
    border-radius: 1.5rem;
    border: 2px solid #fff7ed;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}

.ps-collab-check:hover {
    border-color: var(--ps-orange);
    transform: translateX(10px);
}

.ps-collab-check label {
    font-weight: 700 !important;
    display: flex !important;
    align-items: center;
    gap: 1rem;
    margin: 0 !important;
    cursor: pointer;
}

.ps-collab-check input {
    width: 20px !important;
    height: 20px !important;
    accent-color: var(--ps-orange);
}

/* Payment Methods / Order Review inner blocks */
.woocommerce-checkout #payment {
    background: transparent !important;
    border-radius: 0 !important;
}

.woocommerce-checkout #payment ul.payment_methods {
    border-bottom: 1px solid #fed7aa !important;
    padding: 0 0 1rem 0 !important;
}

/* Remove WooCommerce "optional" string suffix */
.optional {
    display: none !important;
}

/* Responsive */
@media (max-width: 992px) {
    .checkout.woocommerce-checkout {
        grid-template-columns: 100%;
    }
    .woocommerce-checkout .col2-set {
        grid-column: 1;
        grid-row: 1;
    }
    .woocommerce-checkout #order_review_heading {
        grid-column: 1;
        grid-row: 2;
    }
    .woocommerce-checkout #order_review {
        grid-column: 1;
        grid-row: 3;
    }
    .cart_totals {
        width: 100% !important;
    }
}

/* ══════════════════════════════════════════════════════════════
   Single Product & Account Polish (Candy v2)
   ══════════════════════════════════════════════════════════════ */

/* Single Product Bits */
.single-product .product_title {
    font-size: 3.5rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    margin-bottom: 1.5rem !important;
    letter-spacing: -0.02em !important;
    color: var(--ps-gray-dark);
}

.single-product p.price {
    font-size: 3rem !important;
    color: var(--ps-orange) !important;
    font-weight: 900 !important;
    margin-bottom: 2rem !important;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.single-product .woocommerce-product-details__short-description {
    font-size: 1.2rem !important;
    line-height: 1.8 !important;
    color: #4b5563 !important;
    margin-bottom: 3rem !important;
    padding: 2rem;
    background: #fff7ed;
    border-radius: 1.5rem;
    border-left: 5px solid var(--ps-orange);
}

.single-product div.product form.cart .button {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    padding: 1.8rem 5rem !important;
    font-size: 1.2rem !important;
    font-weight: 900 !important;
    border-radius: 100px !important;
    box-shadow: 0 15px 35px rgba(249, 115, 22, 0.4) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
}

/* Quantity Input Polish */
.woocommerce .quantity .qty {
    width: 90px !important;
    height: 65px !important;
    border-radius: 15px !important;
    border: 3px solid #fed7aa !important;
    background: #fff !important;
    font-weight: 900 !important;
    font-size: 1.2rem !important;
    text-align: center !important;
}

/* My Account Polish */
.woocommerce-account .woocommerce {
    max-width: 1200px;
    margin: 4rem auto;
}

.woocommerce-account .woocommerce-MyAccount-navigation {
    background: #fff7ed;
    padding: 2.5rem;
    border-radius: 2rem;
    border: 2px solid #fed7aa;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    margin-bottom: 3rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none !important;
    padding: 0 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
    margin: 0 !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a {
    display: inline-block;
    padding: 1rem 2rem;
    background: #fff;
    border-radius: 100px;
    font-weight: 800;
    color: var(--ps-gray-dark);
    text-decoration: none;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
    background: var(--ps-orange);
    color: #fff;
    border-color: #ea580c;
    transform: translateY(-3px);
}

.woocommerce-account .woocommerce-MyAccount-content {
    background: #fff;
    padding: 4rem;
    border-radius: var(--ps-radius);
    border: 2px solid #fed7aa;
    box-shadow: var(--ps-shadow);
}

.woocommerce-account .woocommerce-MyAccount-content p {
    font-size: 1.2rem;
    line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════
   Candy UI Common Animations
   ══════════════════════════════════════════════════════════════ */

@keyframes ps-pulse {
    0% { transform: scale(1); box-shadow: 0 25px 50px -12px rgba(249, 115, 22, 0.1); }
    50% { transform: scale(1.02); box-shadow: 0 35px 60px -15px rgba(249, 115, 22, 0.2); }
    100% { transform: scale(1); box-shadow: 0 25px 50px -12px rgba(249, 115, 22, 0.1); }
}

@keyframes ps-flag-float {
    0% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-10px) rotate(2deg); }
    100% { transform: translateY(0) rotate(0); }
}

@keyframes ps-float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

@keyframes scroll-extreme {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-ps-pulse {
    animation: ps-pulse 3s infinite ease-in-out;
}

.animate-ps-float {
    animation: ps-float 6s infinite ease-in-out;
}

.ps-bg-flag-img {
    @apply object-contain pointer-events-none select-none;
    display: inline-block;
    vertical-align: middle;
}

.ps-flag-pulse a {
    animation: ps-flag-float 5s infinite ease-in-out;
}

.ps-flag-pulse a:nth-child(2n) {
    animation-delay: 0.5s;
    animation-duration: 4.5s;
}

.ps-flag-pulse a:nth-child(3n) {
    animation-delay: 1.2s;
    animation-duration: 5.5s;
}

.animate-scroll-extreme {
    display: flex;
    width: 200%;
    animation: scroll-extreme 30s linear infinite;
}

/* Candy Card Interactivity */
.ps-candy-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ps-candy-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--ps-orange);
    box-shadow: 0 40px 80px -20px rgba(249, 115, 22, 0.2);
}

.ps-points-count {
    transition: all 0.3s ease;
}

.ps-candy-card:hover .ps-points-count {
    transform: scale(1.1);
    color: var(--ps-orange-hover);
}
