:root {
    --silly-core-red: #ff4545;
    --silly-core-ink: #202428;
    --silly-core-muted: #687078;
    --silly-core-line: #e4e7ea;
    --silly-core-soft: #f7f8f8;
}

.silly-search-form.silly-smart-search {
    height: 47px;
    line-height: normal;
    z-index: 10020;
}

.silly-search-form.silly-smart-search > button[type="submit"] {
    top: 6px !important;
    right: 10px !important;
    transform: none !important;
}

.silly-search-form.silly-smart-search > button[type="submit"] span {
    width: 20px;
    height: 20px;
    overflow: hidden;
    color: transparent;
    position: relative;
    transform: none !important;
}

.silly-search-form.silly-smart-search > button[type="submit"] span::before {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    left: 2px;
    top: 2px;
    border: 2px solid var(--silly-core-red);
    border-radius: 50%;
}

.silly-search-form.silly-smart-search > button[type="submit"] span::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 2px;
    left: 12px;
    top: 13px;
    border-radius: 2px;
    background: var(--silly-core-red);
    transform: rotate(-48deg);
    transform-origin: left center;
}

.silly-search-results {
    position: absolute;
    top: calc(100% + 9px);
    left: 0;
    width: min(430px, 92vw);
    max-height: min(520px, 68vh);
    overflow-y: auto;
    padding: 7px;
    border: 1px solid var(--silly-core-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(20, 25, 28, .16);
    box-sizing: border-box;
}

.silly-search-results[hidden] { display: none !important; }

.silly-search-result {
    display: grid !important;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 70px;
    padding: 7px;
    border-radius: 6px;
    color: var(--silly-core-ink) !important;
    text-decoration: none !important;
}

.silly-search-result:hover,
.silly-search-result:focus,
.silly-search-result.is-active {
    background: #fff3f3;
    outline: none;
}

.silly-search-result img,
.silly-search-result__category-icon {
    width: 58px !important;
    height: 58px !important;
    border-radius: 5px;
    object-fit: cover;
    background: var(--silly-core-soft);
}

.silly-search-result__category-icon {
    position: relative;
    display: block;
}

.silly-search-result__category-icon::before {
    content: "";
    position: absolute;
    inset: 16px 13px 14px;
    border: 2px solid var(--silly-core-red);
    border-radius: 3px;
}

.silly-search-result__copy { min-width: 0; }
.silly-search-result__copy strong,
.silly-search-result__copy span { display: block; letter-spacing: 0; }
.silly-search-result__copy strong { font-size: 13px; line-height: 1.35; }
.silly-search-result__copy span { margin-top: 4px; color: var(--silly-core-muted); font-size: 12px; }
.silly-search-result--category { margin-top: 5px; border-top: 1px solid var(--silly-core-line); border-radius: 0 0 6px 6px; }
.silly-search-message { padding: 16px; color: var(--silly-core-muted); font-size: 13px; text-align: center; }
.silly-search-message.is-loading { color: var(--silly-core-ink); }

body.woocommerce-cart #content,
body.woocommerce-checkout #content,
body.woocommerce-order-received #content {
    padding-top: 34px;
}

body.woocommerce-cart .wc-block-cart,
body.woocommerce-checkout .wc-block-checkout,
body.woocommerce-order-received .woocommerce {
    color: var(--silly-core-ink);
}

.wc-block-components-button:not(.is-link) {
    border-radius: 6px !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    font-weight: 750 !important;
}

body.woocommerce-checkout .wc-block-components-checkout-step,
body.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-block {
    border-color: var(--silly-core-line) !important;
}

body.woocommerce-checkout .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-combobox .wc-block-components-combobox-control input {
    border-radius: 6px !important;
}

body.woocommerce-checkout .wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button {
    min-height: 54px;
    background: var(--silly-core-red) !important;
    color: #fff !important;
}

body.woocommerce-order-received .woocommerce-notice--success,
body.woocommerce-order-received .woocommerce-thankyou-order-received {
    margin: 0 0 24px;
    padding: 18px 20px 18px 54px;
    border: 1px solid #cce7d4;
    border-radius: 8px;
    background: #f4fbf6;
    color: #174d27;
    font-size: 17px;
    font-weight: 750;
    position: relative;
}

body.woocommerce-order-received .woocommerce-notice--success::before,
body.woocommerce-order-received .woocommerce-thankyou-order-received::before {
    content: "✓";
    position: absolute;
    left: 18px;
    top: 50%;
    width: 24px;
    height: 24px;
    transform: translateY(-50%);
    border-radius: 50%;
    background: #258344;
    color: #fff;
    line-height: 24px;
    text-align: center;
}

body.woocommerce-order-received ul.woocommerce-order-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 0 0 34px;
    padding: 0;
    border: 1px solid var(--silly-core-line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

body.woocommerce-order-received ul.woocommerce-order-overview li {
    float: none;
    width: auto;
    margin: 0;
    padding: 16px;
    border-right: 1px solid var(--silly-core-line);
    color: var(--silly-core-muted);
    line-height: 1.4;
    list-style: none;
}

body.woocommerce-order-received ul.woocommerce-order-overview li::marker { content: ""; }

body.woocommerce-order-received ul.woocommerce-order-overview li:last-child { border-right: 0; }
body.woocommerce-order-received ul.woocommerce-order-overview li strong { display: block; margin-top: 5px; color: var(--silly-core-ink); font-size: 14px; }

body.woocommerce-order-received .woocommerce-order-details,
body.woocommerce-order-received .woocommerce-customer-details {
    position: relative;
    margin: 0 0 28px;
    padding: 24px;
    border: 1px solid var(--silly-core-line);
    border-radius: 8px;
    background: #fff;
}

body.woocommerce-order-received .woocommerce-order-details h2,
body.woocommerce-order-received .woocommerce-customer-details h2 {
    position: static;
    display: block;
    width: auto;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--silly-core-ink);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.25;
    text-transform: none;
    word-spacing: 0;
}

body.woocommerce-order-received .woocommerce-order-details table.shop_table {
    margin: 0;
    border: 0;
    border-collapse: collapse;
    background: #fff;
}

body.woocommerce-order-received .woocommerce-order-details table.shop_table th,
body.woocommerce-order-received .woocommerce-order-details table.shop_table td {
    padding: 13px 12px;
    border: 0;
    border-bottom: 1px solid var(--silly-core-line);
    background: #fff;
}

body.woocommerce-order-received .woocommerce-order-details table.shop_table thead th {
    background: var(--silly-core-soft);
    color: var(--silly-core-ink);
}

body.woocommerce-order-received .woocommerce-order-details table.shop_table tr:last-child th,
body.woocommerce-order-received .woocommerce-order-details table.shop_table tr:last-child td { border-bottom: 0; }

body.woocommerce-order-received .woocommerce-columns--addresses {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

body.woocommerce-order-received .woocommerce-columns--addresses .woocommerce-column {
    float: none;
    width: auto;
    max-width: none;
    padding: 0;
}

body.woocommerce-order-received .woocommerce-customer-details address {
    min-height: 100%;
    padding: 18px;
    border: 1px solid var(--silly-core-line);
    border-radius: 6px;
    background: #fff;
    line-height: 1.7;
}

@media (max-width: 767px) {
    .silly-search-form.silly-smart-search { width: calc(100vw - 76px) !important; max-width: 360px !important; }
    .silly-search-results { width: calc(100vw - 32px); max-height: 58vh; }

    body.woocommerce-cart #content,
    body.woocommerce-checkout #content,
    body.woocommerce-order-received #content { padding: 28px 0 46px; }

    body.woocommerce-cart .wc-block-cart-items {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important;
    }

    body.woocommerce-cart .wc-block-cart-items thead { display: none !important; }
    body.woocommerce-cart .wc-block-cart-items tbody { display: grid !important; gap: 12px; }

    body.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__row {
        display: grid !important;
        grid-template-columns: 72px minmax(0, 1fr) !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px !important;
        border: 1px solid var(--silly-core-line) !important;
        border-radius: 8px;
        background: #fff;
        box-sizing: border-box;
    }

    body.woocommerce-cart .wc-block-cart-item__image,
    body.woocommerce-cart .wc-block-cart-item__product {
        display: block !important;
        width: auto !important;
        max-width: 100% !important;
        padding: 0 !important;
        border: 0 !important;
    }

    body.woocommerce-cart .wc-block-cart-item__image { grid-column: 1; }
    body.woocommerce-cart .wc-block-cart-item__product { grid-column: 2; padding-left: 12px !important; min-width: 0; }
    body.woocommerce-cart .wc-block-cart-item__total { display: none !important; }
    body.woocommerce-cart .wc-block-cart-item__image img { width: 72px !important; height: 72px !important; object-fit: cover; border-radius: 5px; }
    body.woocommerce-cart .wc-block-components-product-name { display: block; font-size: 14px !important; line-height: 1.35; overflow-wrap: anywhere; }
    body.woocommerce-cart .wc-block-cart-item__prices { margin: 5px 0; }
    body.woocommerce-cart .wc-block-components-product-metadata { font-size: 12px; line-height: 1.45; }
    body.woocommerce-cart .wc-block-cart-item__quantity { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
    body.woocommerce-cart .wc-block-cart-item__remove-link { margin: 0 !important; }

    body.woocommerce-checkout .wc-block-checkout__main,
    body.woocommerce-checkout .wc-block-checkout__sidebar { padding-left: 0 !important; padding-right: 0 !important; }
    body.woocommerce-checkout .wc-block-components-checkout-step { padding-left: 0 !important; }
    body.woocommerce-checkout .wc-block-components-checkout-step__container { margin-left: 0 !important; }
    body.woocommerce-checkout .wc-block-components-checkout-step__heading { margin-bottom: 14px !important; }
    body.woocommerce-checkout .wc-block-components-checkout-step__title { font-size: 20px !important; letter-spacing: 0; }

    body.woocommerce-order-received .woocommerce { width: 100%; }
    body.woocommerce-order-received ul.woocommerce-order-overview { grid-template-columns: 1fr; }
    body.woocommerce-order-received ul.woocommerce-order-overview li { border-right: 0; border-bottom: 1px solid var(--silly-core-line); }
    body.woocommerce-order-received ul.woocommerce-order-overview li:last-child { border-bottom: 0; }
    body.woocommerce-order-received .woocommerce-order-details,
    body.woocommerce-order-received .woocommerce-customer-details { padding: 17px 14px; }
    body.woocommerce-order-received .woocommerce-order-details table.shop_table { display: table !important; width: 100% !important; }
    body.woocommerce-order-received .woocommerce-order-details table.shop_table th,
    body.woocommerce-order-received .woocommerce-order-details table.shop_table td { padding: 11px 7px; font-size: 12px; overflow-wrap: anywhere; }
    body.woocommerce-order-received .woocommerce-columns--addresses { grid-template-columns: 1fr; }
}
