Make WordPress Themes

Changeset 344069


Ignore:
Timestamp:
08/15/2026 04:25:13 PM (3 months ago)
Author:
themedropbox
Message:

New version of Kabook Mind - 1.1.0

Location:
kabook-mind/1.1.0
Files:
4 added
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • kabook-mind/1.1.0/assets/css/main.css

    r341174 r344069  
    5757        top: 0;
    5858        z-index: 1000;
     59}
     60
     61/* Optional custom header image (Appearance > Customize > Header Image). */
     62.site-header-image {
     63        line-height: 0;
     64        margin-block-end: 1rem;
     65}
     66
     67.site-header-image img {
     68        display: block;
     69        width: 100%;
     70        height: auto;
     71        object-fit: cover;
    5972}
    6073
    … …  
    172185                padding: 1.2rem 0;
    173186                font-size: 1.1rem;
     187        }
     188
     189        /* Menu items with children need room for the toggle button beside the link. */
     190        .main-navigation .menu-item-has-children,
     191        .main-navigation .page_item_has_children {
     192                position: relative;
     193        }
     194
     195        .main-navigation .has-sub-menu-toggle > a {
     196                padding-inline-end: 2.5rem;
     197        }
     198
     199        /* Sub-menu Toggle Button (Mobile) */
     200        .main-navigation .sub-menu-toggle {
     201                position: absolute;
     202                inset-inline-end: 0;
     203                top: 0;
     204                width: 44px;
     205                height: 44px;
     206                display: flex;
     207                align-items: center;
     208                justify-content: center;
     209                background: transparent;
     210                border: none;
     211                cursor: pointer;
     212                padding: 0;
     213        }
     214
     215        .main-navigation .sub-menu-toggle-icon {
     216                display: block;
     217                width: 10px;
     218                height: 10px;
     219                border-inline-end: 2px solid var(--km-primary);
     220                border-block-end: 2px solid var(--km-primary);
     221                transform: rotate(45deg);
     222                transition: transform 0.3s ease;
     223        }
     224
     225        .main-navigation .sub-menu-toggled-on > .sub-menu-toggle .sub-menu-toggle-icon {
     226                transform: rotate(-135deg);
     227        }
     228
     229        /* Nested sub-menus are collapsed by default and expand inline (accordion). */
     230        .main-navigation ul.sub-menu,
     231        .main-navigation ul.children {
     232                display: none;
     233                width: 100%;
     234                list-style: none;
     235                margin: 0;
     236                padding-inline-start: 1rem;
     237        }
     238
     239        .main-navigation .sub-menu-toggled-on > ul.sub-menu,
     240        .main-navigation .sub-menu-toggled-on > ul.children {
     241                display: block;
     242        }
     243
     244        .main-navigation ul.sub-menu li {
     245                border-block-end: 1px solid var(--km-border, #eeeeee);
     246        }
     247
     248        .main-navigation ul.sub-menu a {
     249                display: block;
     250                padding: 1rem 0;
     251                font-size: 1rem;
     252                font-weight: 400;
    174253        }
    175254}
    … …  
    334413}
    335414
     415/* The My Account dashboard (nav + table) needs noticeably more room than a
     416   blog post does — widen just this page instead of the shared single-post
     417   container so blog/page reading width stays untouched. */
     418.woocommerce-account .km-container-single {
     419        max-width: 1140px;
     420}
     421
    336422.entry-title-single {
    337423        font-size: 2.5rem;
    … …  
    10291115        z-index: 100000;
    10301116}
     1117
     1118/*--------------------------------------------------------------
     1119# Block Styles (register_block_style)
     1120--------------------------------------------------------------*/
     1121
     1122/* Button block – Soft Rounded style. */
     1123.wp-block-button.is-style-kabook-soft .wp-block-button__link {
     1124        background-color: transparent;
     1125        border: 2px solid var(--km-secondary);
     1126        border-radius: 999px;
     1127        color: var(--km-secondary);
     1128        transition: background-color 0.2s ease, color 0.2s ease;
     1129}
     1130
     1131.wp-block-button.is-style-kabook-soft .wp-block-button__link:hover,
     1132.wp-block-button.is-style-kabook-soft .wp-block-button__link:focus {
     1133        background-color: var(--km-secondary);
     1134        color: var(--km-surface);
     1135}
     1136
     1137/* Group block – Card style. */
     1138.wp-block-group.is-style-kabook-card {
     1139        background-color: var(--km-surface);
     1140        border: 1px solid var(--km-border);
     1141        border-radius: 12px;
     1142        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
     1143        padding: 1.75rem;
     1144}
     1145
     1146/* Separator block – Dashed style. */
     1147hr.wp-block-separator.is-style-kabook-dashed {
     1148        border: none;
     1149        border-top: 2px dashed var(--km-border);
     1150}
     1151
     1152/*--------------------------------------------------------------
     1153# WooCommerce Visual Package (v1.2.0)
     1154# Dedicated, theme-harmonized styling: header cart, shop toolbar,
     1155# product cards, single product, cart & checkout.
     1156--------------------------------------------------------------*/
     1157
     1158/* =========================================
     1159   Header Actions & Cart Icon
     1160========================================= */
     1161.header-container {
     1162        gap: 1.5rem;
     1163}
     1164
     1165.km-header-actions {
     1166        display: flex;
     1167        align-items: center;
     1168        gap: 0.35rem;
     1169        margin-inline-start: auto;
     1170}
     1171
     1172@media screen and (max-width: 768px) {
     1173        .km-header-actions {
     1174                margin-inline-start: 0.5rem;
     1175                order: 2;
     1176        }
     1177
     1178        .main-navigation {
     1179                order: 3;
     1180        }
     1181}
     1182
     1183.km-header-cart {
     1184        position: relative;
     1185        display: inline-flex;
     1186        align-items: center;
     1187        justify-content: center;
     1188        width: 42px !important;
     1189        height: 42px !important;
     1190        border: none !important;
     1191        border-radius: 50% !important;
     1192        box-shadow: none !important;
     1193        color: var(--km-primary) !important;
     1194        background: transparent !important;
     1195        background-color: transparent !important;
     1196        padding: 0 !important;
     1197        text-decoration: none !important;
     1198        transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
     1199}
     1200
     1201.km-header-cart:hover,
     1202.km-header-cart:focus-visible {
     1203        background-color: rgba(0, 150, 136, 0.1) !important;
     1204        color: var(--km-secondary) !important;
     1205        transform: translateY(-1px);
     1206}
     1207
     1208.km-cart-icon {
     1209        width: 22px;
     1210        height: 22px;
     1211        flex-shrink: 0;
     1212        stroke: currentColor;
     1213        fill: none;
     1214}
     1215
     1216.km-cart-count {
     1217        position: absolute;
     1218        inset-block-start: -2px;
     1219        inset-inline-end: -4px;
     1220        min-width: 19px;
     1221        height: 19px;
     1222        padding-inline: 4px;
     1223        border-radius: 999px;
     1224        background-color: var(--km-secondary);
     1225        color: #ffffff;
     1226        font-size: 0.7rem;
     1227        font-weight: 700;
     1228        line-height: 19px;
     1229        text-align: center;
     1230        box-shadow: 0 0 0 2px var(--km-surface);
     1231        transition: transform 0.2s ease;
     1232}
     1233
     1234.km-cart-count:empty,
     1235.km-cart-count[data-count="0"] {
     1236        display: none;
     1237}
     1238
     1239/* Animate the badge briefly whenever WooCommerce refreshes the cart
     1240   fragment after an AJAX add-to-cart. */
     1241.km-header-cart.added .km-cart-count {
     1242        animation: km-cart-pop 0.4s ease;
     1243}
     1244
     1245@keyframes km-cart-pop {
     1246        0% {
     1247                transform: scale(1);
     1248        }
     1249        40% {
     1250                transform: scale(1.35);
     1251        }
     1252        100% {
     1253                transform: scale(1);
     1254        }
     1255}
     1256
     1257/* =========================================
     1258   Shop Archive Toolbar (result count + ordering)
     1259========================================= */
     1260.woocommerce .woocommerce-notices-wrapper {
     1261        grid-column: 1 / -1;
     1262}
     1263
     1264.woocommerce .woocommerce-result-count,
     1265.woocommerce .woocommerce-ordering {
     1266        margin: 0 !important;
     1267}
     1268
     1269.woocommerce .woocommerce-result-count {
     1270        color: var(--km-text-light);
     1271        font-size: 0.9rem;
     1272}
     1273
     1274.km-woocommerce-page .km-page-header,
     1275.woocommerce-page .km-page-header {
     1276        display: flex;
     1277        flex-wrap: wrap;
     1278        align-items: center;
     1279        justify-content: space-between;
     1280        gap: 1rem;
     1281        margin-block-end: 2.5rem;
     1282}
     1283
     1284.woocommerce .woocommerce-ordering select {
     1285        appearance: none;
     1286        background-color: var(--km-surface);
     1287        border: 1px solid var(--km-border);
     1288        border-radius: 8px;
     1289        padding: 0.55rem 2rem 0.55rem 1rem;
     1290        font-family: var(--km-font-family);
     1291        font-size: 0.9rem;
     1292        color: var(--km-primary);
     1293        cursor: pointer;
     1294        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23777777' 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");
     1295        background-repeat: no-repeat;
     1296        background-position: left 0.6rem center;
     1297        background-size: 14px;
     1298}
     1299
     1300.woocommerce .woocommerce-ordering select:focus {
     1301        outline: none;
     1302        border-color: var(--km-secondary);
     1303        box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.12);
     1304}
     1305
     1306/* =========================================
     1307   Product Badges (Sale / Out of Stock)
     1308========================================= */
     1309.km-onsale-badge,
     1310span.onsale {
     1311        position: absolute !important;
     1312        inset-block-start: 12px;
     1313        inset-inline-start: 12px;
     1314        inset-inline-end: auto;
     1315        min-width: auto !important;
     1316        height: auto !important;
     1317        padding: 0.3rem 0.7rem !important;
     1318        border-radius: 999px !important;
     1319        background-color: var(--km-secondary) !important;
     1320        color: #ffffff !important;
     1321        font-size: 0.75rem !important;
     1322        font-weight: 700 !important;
     1323        line-height: 1.4 !important;
     1324        z-index: 2;
     1325        text-transform: uppercase;
     1326        letter-spacing: 0.02em;
     1327}
     1328
     1329.woocommerce ul.products li.product,
     1330.woocommerce div.product div.images {
     1331        position: relative;
     1332}
     1333
     1334.woocommerce ul.products li.product.outofstock {
     1335        opacity: 0.7;
     1336}
     1337
     1338.woocommerce ul.products li.product.outofstock::after {
     1339        content: attr(data-km-outofstock);
     1340}
     1341
     1342.woocommerce span.stock.out-of-stock,
     1343.woocommerce p.stock.out-of-stock {
     1344        display: inline-block;
     1345        background-color: #fdecea;
     1346        color: #c0392b;
     1347        border-radius: 999px;
     1348        padding: 0.3rem 0.9rem;
     1349        font-size: 0.85rem;
     1350        font-weight: 600;
     1351}
     1352
     1353.woocommerce span.stock.in-stock,
     1354.woocommerce p.stock.in-stock {
     1355        display: inline-block;
     1356        background-color: #e8f6f3;
     1357        color: #009688;
     1358        border-radius: 999px;
     1359        padding: 0.3rem 0.9rem;
     1360        font-size: 0.85rem;
     1361        font-weight: 600;
     1362}
     1363
     1364/* =========================================
     1365   Product Card Refinements (Shop / Archive)
     1366========================================= */
     1367.woocommerce ul.products li.product .woocommerce-loop-product__link {
     1368        display: flex;
     1369        flex-direction: column;
     1370        flex-grow: 1;
     1371}
     1372
     1373.woocommerce ul.products li.product img {
     1374        transition: transform 0.5s ease;
     1375}
     1376
     1377.woocommerce ul.products li.product:hover img {
     1378        transform: scale(1.05);
     1379}
     1380
     1381.woocommerce ul.products li.product .star-rating {
     1382        margin-inline: auto !important;
     1383        margin-block-end: 0.5rem !important;
     1384        font-size: 0.9rem !important;
     1385        color: var(--km-border);
     1386}
     1387
     1388.woocommerce ul.products li.product .star-rating span::before,
     1389.woocommerce .star-rating span::before {
     1390        color: #f5a623;
     1391}
     1392
     1393.woocommerce ul.products li.product del {
     1394        color: var(--km-text-light) !important;
     1395        font-weight: 400 !important;
     1396        opacity: 0.8;
     1397        margin-inline-end: 0.4rem;
     1398}
     1399
     1400.woocommerce ul.products li.product ins {
     1401        text-decoration: none;
     1402}
     1403
     1404/* Quick "Add to cart" reveal on hover (desktop), always visible on touch. */
     1405.woocommerce ul.products li.product .add_to_cart_button,
     1406.woocommerce ul.products li.product .button.product_type_simple {
     1407        opacity: 1;
     1408}
     1409
     1410@media screen and (min-width: 769px) {
     1411        .woocommerce ul.products li.product .button {
     1412                opacity: 0;
     1413                transform: translateY(6px);
     1414                transition: opacity 0.25s ease, transform 0.25s ease;
     1415        }
     1416
     1417        .woocommerce ul.products li.product:hover .button,
     1418        .woocommerce ul.products li.product:focus-within .button {
     1419                opacity: 1;
     1420                transform: translateY(0);
     1421        }
     1422}
     1423
     1424.woocommerce ul.products li.product .added_to_cart {
     1425        display: block;
     1426        margin-block-start: 0.5rem !important;
     1427        font-size: 0.85rem;
     1428}
     1429
     1430/* =========================================
     1431   Breadcrumbs
     1432========================================= */
     1433.woocommerce-breadcrumb {
     1434        color: var(--km-text-light);
     1435        font-size: 0.85rem;
     1436        margin-block-end: 1.5rem !important;
     1437        grid-column: 1 / -1;
     1438}
     1439
     1440.woocommerce-breadcrumb a {
     1441        color: var(--km-text-light);
     1442}
     1443
     1444.woocommerce-breadcrumb a:hover {
     1445        color: var(--km-secondary);
     1446}
     1447
     1448/* =========================================
     1449   Single Product — Sticky Gallery & Summary
     1450========================================= */
     1451@media screen and (min-width: 992px) {
     1452        .woocommerce div.product div.images {
     1453                position: sticky;
     1454                top: 110px;
     1455                align-self: start;
     1456        }
     1457}
     1458
     1459.woocommerce div.product .woocommerce-product-rating {
     1460        display: flex;
     1461        align-items: center;
     1462        gap: 0.6rem;
     1463        margin-block-end: 1rem;
     1464}
     1465
     1466.woocommerce div.product p.price del {
     1467        color: var(--km-text-light);
     1468        font-size: 1.1rem;
     1469        font-weight: 400;
     1470        margin-inline-end: 0.5rem;
     1471}
     1472
     1473.woocommerce div.product p.price ins {
     1474        text-decoration: none;
     1475}
     1476
     1477.woocommerce div.product .stock {
     1478        margin-block-end: 1.5rem;
     1479}
     1480
     1481.woocommerce div.product .woocommerce-product-details__short-description {
     1482        color: #444444;
     1483        font-size: 1.02rem;
     1484        line-height: 1.8;
     1485        margin-block-end: 1.5rem;
     1486}
     1487
     1488/* Quantity Stepper */
     1489.woocommerce div.product form.cart {
     1490        display: flex;
     1491        flex-wrap: wrap;
     1492        align-items: center;
     1493        gap: 1rem;
     1494        margin-block-end: 1.5rem;
     1495}
     1496
     1497.woocommerce div.product .quantity {
     1498        display: inline-flex;
     1499}
     1500
     1501.woocommerce div.product .quantity .qty,
     1502.woocommerce div.product .quantity input.qty {
     1503        width: 70px;
     1504        padding: 0.65rem 0.5rem;
     1505        text-align: center;
     1506        border: 1px solid var(--km-border);
     1507        border-radius: 8px;
     1508        font-family: var(--km-font-family);
     1509        font-size: 1rem;
     1510        color: var(--km-primary);
     1511        background-color: var(--km-surface);
     1512}
     1513
     1514.woocommerce div.product .quantity .qty:focus {
     1515        outline: none;
     1516        border-color: var(--km-secondary);
     1517        box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.12);
     1518}
     1519
     1520.woocommerce div.product .single_add_to_cart_button {
     1521        padding-inline: 2.2rem !important;
     1522        font-size: 1rem !important;
     1523}
     1524
     1525/* Trust / Shipping Info Bar */
     1526.woocommerce div.product .km-product-trust-bar {
     1527        grid-column: 1 / -1;
     1528        display: grid;
     1529        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
     1530        gap: 1rem;
     1531        margin-block-start: 1rem;
     1532        padding-block: 1.5rem;
     1533        border-block: 1px solid var(--km-border);
     1534}
     1535
     1536.woocommerce div.product .km-product-trust-bar .km-trust-item {
     1537        display: flex;
     1538        align-items: center;
     1539        gap: 0.6rem;
     1540        font-size: 0.9rem;
     1541        color: var(--km-text-light);
     1542}
     1543
     1544/* Product Tabs Polish */
     1545.woocommerce div.product .woocommerce-tabs ul.tabs li a {
     1546        padding: 0.7rem 1.4rem;
     1547        display: inline-block;
     1548        font-weight: 600;
     1549        font-size: 0.95rem;
     1550}
     1551
     1552.woocommerce div.product .woocommerce-tabs .panel h2 {
     1553        font-size: 1.4rem;
     1554        color: var(--km-primary);
     1555        margin-block-start: 0;
     1556}
     1557
     1558.woocommerce table.shop_attributes {
     1559        border: none;
     1560        font-size: 0.95rem;
     1561}
     1562
     1563.woocommerce table.shop_attributes th,
     1564.woocommerce table.shop_attributes td {
     1565        border: none;
     1566        border-block-end: 1px solid var(--km-border);
     1567        padding: 0.7rem 0.5rem;
     1568}
     1569
     1570.woocommerce table.shop_attributes th {
     1571        color: var(--km-primary);
     1572        font-weight: 600;
     1573        background: transparent;
     1574}
     1575
     1576/* =========================================
     1577   Cart & Checkout Pages
     1578========================================= */
     1579.woocommerce table.shop_table {
     1580        border: 1px solid var(--km-border);
     1581        border-radius: 12px;
     1582        overflow: hidden;
     1583        border-collapse: separate;
     1584        border-spacing: 0;
     1585}
     1586
     1587.woocommerce table.shop_table th {
     1588        background-color: var(--km-background);
     1589        color: var(--km-primary);
     1590        font-weight: 600;
     1591        padding: 1rem;
     1592        border-block-end: 1px solid var(--km-border);
     1593}
     1594
     1595.woocommerce table.shop_table td {
     1596        padding: 1rem;
     1597        border-block-end: 1px solid var(--km-border);
     1598        vertical-align: middle;
     1599}
     1600
     1601.woocommerce table.shop_table tr:last-child td {
     1602        border-block-end: none;
     1603}
     1604
     1605.woocommerce td.product-name a {
     1606        color: var(--km-primary);
     1607        font-weight: 600;
     1608}
     1609
     1610.woocommerce .cart-collaterals .cart_totals,
     1611.woocommerce-checkout .woocommerce-checkout-review-order,
     1612.woocommerce-checkout #order_review {
     1613        background-color: var(--km-surface);
     1614        border: 1px solid var(--km-border);
     1615        border-radius: 12px;
     1616        padding: 1.75rem;
     1617}
     1618
     1619.woocommerce .cart_totals h2,
     1620.woocommerce-checkout #order_review h3 {
     1621        font-size: 1.3rem;
     1622        color: var(--km-primary);
     1623        margin-block-start: 0;
     1624}
     1625
     1626.woocommerce .cart_totals table.shop_table,
     1627.woocommerce-checkout table.shop_table {
     1628        border: none;
     1629}
     1630
     1631.woocommerce .cart_totals .order-total .amount {
     1632        color: var(--km-secondary);
     1633        font-weight: 700;
     1634        font-size: 1.2rem;
     1635}
     1636
     1637.woocommerce-cart .coupon {
     1638        display: flex;
     1639        flex-wrap: wrap;
     1640        gap: 0.75rem;
     1641        align-items: center;
     1642}
     1643
     1644.woocommerce-cart .coupon .input-text {
     1645        padding: 0.65rem 1rem;
     1646        border: 1px solid var(--km-border);
     1647        border-radius: 8px;
     1648        font-family: var(--km-font-family);
     1649}
     1650
     1651.woocommerce-checkout input.input-text,
     1652.woocommerce-checkout select,
     1653.woocommerce-checkout textarea {
     1654        width: 100%;
     1655        padding: 0.75rem 1rem;
     1656        border: 1px solid var(--km-border);
     1657        border-radius: 8px;
     1658        font-family: var(--km-font-family);
     1659        background-color: var(--km-surface);
     1660        color: var(--km-primary);
     1661}
     1662
     1663.woocommerce-checkout input.input-text:focus,
     1664.woocommerce-checkout select:focus,
     1665.woocommerce-checkout textarea:focus {
     1666        outline: none;
     1667        border-color: var(--km-secondary);
     1668        box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.12);
     1669}
     1670
     1671.woocommerce-checkout #payment {
     1672        background-color: var(--km-surface);
     1673        border: 1px solid var(--km-border);
     1674        border-radius: 12px;
     1675        padding: 1.5rem;
     1676        margin-block-start: 1.5rem;
     1677}
     1678
     1679.woocommerce-checkout #payment ul.payment_methods {
     1680        list-style: none;
     1681        padding: 0;
     1682}
     1683
     1684.woocommerce-checkout #payment div.payment_box {
     1685        background-color: var(--km-background);
     1686        border-radius: 8px;
     1687}
     1688
     1689/* =========================================
     1690   Empty Cart State
     1691========================================= */
     1692.woocommerce-cart-form,
     1693.woocommerce .cart-empty {
     1694        font-size: 1.05rem;
     1695}
     1696
     1697.woocommerce a.button.wc-backward {
     1698        display: inline-block;
     1699        margin-block-start: 1rem;
     1700}
     1701
     1702/* =========================================
     1703   Responsive: Shop / Product on Small Screens
     1704========================================= */
     1705@media screen and (max-width: 480px) {
     1706        .woocommerce ul.products {
     1707                grid-template-columns: 1fr 1fr !important;
     1708                gap: 1rem !important;
     1709        }
     1710
     1711        .woocommerce ul.products li.product .woocommerce-loop-product__title {
     1712                font-size: 1rem !important;
     1713        }
     1714
     1715        .woocommerce div.product .product_title {
     1716                font-size: 1.8rem;
     1717        }
     1718
     1719        .woocommerce div.product p.price {
     1720                font-size: 1.4rem;
     1721        }
     1722}
     1723
     1724/*--------------------------------------------------------------
     1725# Header Search (icon toggle + full-screen overlay) — v1.2.0
     1726--------------------------------------------------------------*/
     1727
     1728/* Icon Button (hardened to match the header cart button exactly, and to
     1729   win against generic button styling from page builders / plugins that
     1730   target the bare <button> element, e.g. Elementor's default button skin). */
     1731.km-header-search-toggle,
     1732button.km-header-search-toggle {
     1733        position: relative;
     1734        display: inline-flex;
     1735        align-items: center;
     1736        justify-content: center;
     1737        width: 42px !important;
     1738        height: 42px !important;
     1739        margin: 0 !important;
     1740        border: none !important;
     1741        border-radius: 50% !important;
     1742        background: transparent !important;
     1743        background-color: transparent !important;
     1744        box-shadow: none !important;
     1745        color: var(--km-primary) !important;
     1746        cursor: pointer;
     1747        padding: 0 !important;
     1748        appearance: none;
     1749        -webkit-appearance: none;
     1750        line-height: 1;
     1751        font-size: 0;
     1752        transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
     1753}
     1754
     1755.km-header-search-toggle:hover,
     1756.km-header-search-toggle:focus-visible,
     1757button.km-header-search-toggle:hover,
     1758button.km-header-search-toggle:focus-visible {
     1759        background-color: rgba(0, 150, 136, 0.1) !important;
     1760        color: var(--km-secondary) !important;
     1761        transform: translateY(-1px);
     1762        outline: none;
     1763}
     1764
     1765.km-search-icon {
     1766        width: 21px;
     1767        height: 21px;
     1768        flex-shrink: 0;
     1769        stroke: currentColor;
     1770        fill: none;
     1771}
     1772
     1773/* Full-screen Overlay */
     1774.km-search-overlay {
     1775        position: fixed;
     1776        inset: 0;
     1777        z-index: 10050;
     1778        display: flex;
     1779        align-items: flex-start;
     1780        justify-content: center;
     1781        padding-block-start: 12vh;
     1782        padding-inline: 5%;
     1783        background-color: rgba(20, 25, 30, 0.55);
     1784        backdrop-filter: blur(4px);
     1785        -webkit-backdrop-filter: blur(4px);
     1786        opacity: 0;
     1787        visibility: hidden;
     1788        transition: opacity 0.3s ease, visibility 0.3s ease;
     1789}
     1790
     1791.km-search-overlay.is-active {
     1792        opacity: 1;
     1793        visibility: visible;
     1794}
     1795
     1796.km-search-overlay-inner {
     1797        position: relative;
     1798        width: 100%;
     1799        max-width: 640px;
     1800        transform: translateY(-16px);
     1801        transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
     1802}
     1803
     1804.km-search-overlay.is-active .km-search-overlay-inner {
     1805        transform: translateY(0);
     1806}
     1807
     1808.km-search-close {
     1809        position: absolute;
     1810        inset-block-start: -52px;
     1811        inset-inline-end: 0;
     1812        display: inline-flex;
     1813        align-items: center;
     1814        justify-content: center;
     1815        width: 40px;
     1816        height: 40px;
     1817        border: none;
     1818        border-radius: 50%;
     1819        background-color: rgba(255, 255, 255, 0.12);
     1820        color: #ffffff;
     1821        cursor: pointer;
     1822        transition: background-color 0.2s ease, transform 0.2s ease;
     1823}
     1824
     1825.km-search-close:hover,
     1826.km-search-close:focus-visible {
     1827        background-color: rgba(255, 255, 255, 0.22);
     1828        transform: rotate(90deg);
     1829}
     1830
     1831/* Wrapper around the decorative icon + the theme's standard search form
     1832   (output via get_search_form(), so it stays filterable via the core
     1833   "get_search_form" hook — see inc/header-search.php). */
     1834.km-search-overlay-form-wrap {
     1835        display: flex;
     1836        align-items: center;
     1837        gap: 0.75rem;
     1838        background-color: var(--km-surface);
     1839        border-radius: 16px;
     1840        padding: 0.5rem 0.5rem 0.5rem 1.5rem;
     1841        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
     1842}
     1843
     1844.km-search-overlay-icon {
     1845        flex-shrink: 0;
     1846        color: var(--km-text-light);
     1847}
     1848
     1849/* Restyle the standard .search-form / .search-field / .search-submit
     1850   markup (same classes used by the sidebar search widget) into the
     1851   larger, borderless look that fits the overlay. */
     1852.km-search-overlay-form-wrap .search-form {
     1853        display: flex;
     1854        align-items: center;
     1855        flex: 1 1 auto;
     1856        gap: 0.75rem;
     1857}
     1858
     1859.km-search-overlay-form-wrap .search-form label {
     1860        flex: 1 1 auto;
     1861        margin: 0;
     1862}
     1863
     1864.km-search-overlay-form-wrap .search-field {
     1865        width: 100%;
     1866        border: none;
     1867        outline: none;
     1868        background: transparent;
     1869        font-family: var(--km-font-family);
     1870        font-size: 1.15rem;
     1871        color: var(--km-primary);
     1872        padding-block: 0.9rem;
     1873        padding-inline: 0;
     1874}
     1875
     1876.km-search-overlay-form-wrap .search-field::placeholder {
     1877        color: var(--km-text-light);
     1878}
     1879
     1880.km-search-overlay-form-wrap .search-submit {
     1881        flex-shrink: 0;
     1882        border: none !important;
     1883        border-radius: 12px !important;
     1884        background-color: var(--km-secondary) !important;
     1885        color: #ffffff !important;
     1886        font-family: var(--km-font-family);
     1887        font-weight: 600;
     1888        font-size: 0.95rem;
     1889        padding: 0.85rem 1.6rem !important;
     1890        cursor: pointer;
     1891        transition: background-color 0.2s ease;
     1892}
     1893
     1894.km-search-overlay-form-wrap .search-submit:hover,
     1895.km-search-overlay-form-wrap .search-submit:focus-visible {
     1896        background-color: var(--km-primary) !important;
     1897}
     1898
     1899/* Prevent background scroll while the overlay is open. */
     1900body.km-search-open {
     1901        overflow: hidden;
     1902}
     1903
     1904@media screen and (max-width: 600px) {
     1905        .km-search-overlay {
     1906                padding-block-start: 18vh;
     1907        }
     1908
     1909        .km-search-overlay-form-wrap {
     1910                flex-wrap: wrap;
     1911                border-radius: 14px;
     1912                padding: 1rem;
     1913        }
     1914
     1915        .km-search-overlay-form-wrap .search-form {
     1916                flex-basis: 100%;
     1917                order: 1;
     1918        }
     1919
     1920        .km-search-overlay-form-wrap .search-field {
     1921                padding-block: 0.6rem;
     1922        }
     1923
     1924        .km-search-overlay-icon {
     1925                order: 0;
     1926        }
     1927
     1928        .km-search-overlay-form-wrap .search-submit {
     1929                order: 2;
     1930                margin-inline-start: auto;
     1931        }
     1932}
     1933
     1934/*--------------------------------------------------------------
     1935# WooCommerce My Account — v1.2.0
     1936# Sidebar navigation, dashboard, orders, downloads, addresses,
     1937# account details, and login/register forms.
     1938--------------------------------------------------------------*/
     1939
     1940/* =========================================
     1941   Notices (info / success / error) — used across
     1942   My Account, Cart, and Checkout.
     1943========================================= */
     1944.woocommerce-message,
     1945.woocommerce-info,
     1946.woocommerce-error,
     1947.woocommerce-noreviews {
     1948        display: flex;
     1949        flex-wrap: wrap;
     1950        align-items: center;
     1951        gap: 0.75rem;
     1952        list-style: none;
     1953        margin: 0 0 2rem !important;
     1954        padding: 1rem 1.5rem !important;
     1955        border-radius: 10px;
     1956        font-size: 0.95rem;
     1957}
     1958
     1959.woocommerce-message {
     1960        background-color: #e8f6f3;
     1961        color: #00695c;
     1962        border: 1px solid #b6e4dc;
     1963}
     1964
     1965.woocommerce-info {
     1966        background-color: #eef2ff;
     1967        color: #3730a3;
     1968        border: 1px solid #cdd4fb;
     1969}
     1970
     1971.woocommerce-error {
     1972        background-color: #fdecea;
     1973        color: #a3241a;
     1974        border: 1px solid #f6c6c1;
     1975}
     1976
     1977.woocommerce-message .button,
     1978.woocommerce-info .button {
     1979        margin-inline-start: auto;
     1980}
     1981
     1982/* =========================================
     1983   My Account — Layout
     1984
     1985   WooCommerce's own default stylesheet lays this out with legacy,
     1986   non-RTL-aware floats (nav 30% / content 68%, both float:left),
     1987   which fights an RTL site and causes the nav column to render far
     1988   too narrow (text wrapping/overlapping the icon). We cancel that
     1989   float layout first, then build our own layout using :has() so it
     1990   works no matter which element WooCommerce uses as the wrapper.
     1991========================================= */
     1992.woocommerce-MyAccount-navigation,
     1993.woocommerce-MyAccount-content {
     1994        float: none !important;
     1995        width: auto !important;
     1996        margin: 0 !important;
     1997}
     1998
     1999.woocommerce-account .woocommerce {
     2000        display: grid;
     2001        grid-template-columns: 260px 1fr;
     2002        gap: 2.5rem;
     2003        align-items: start;
     2004}
     2005
     2006.woocommerce-account :where(main, div, section, article):has( > .woocommerce-MyAccount-navigation ) {
     2007        display: flex;
     2008        flex-wrap: wrap;
     2009        align-items: flex-start;
     2010        gap: 2.5rem;
     2011}
     2012
     2013.woocommerce-MyAccount-navigation {
     2014        flex: 0 0 260px;
     2015        max-width: 260px;
     2016}
     2017
     2018.woocommerce-MyAccount-content {
     2019        flex: 1 1 320px;
     2020        min-width: 0;
     2021}
     2022
     2023@media screen and (max-width: 860px) {
     2024        .woocommerce-account .woocommerce,
     2025        .woocommerce-account :where(main, div, section, article):has( > .woocommerce-MyAccount-navigation ) {
     2026                grid-template-columns: 1fr;
     2027                flex-direction: column;
     2028                gap: 1.5rem;
     2029        }
     2030
     2031        .woocommerce-MyAccount-navigation {
     2032                flex-basis: auto;
     2033                max-width: 100%;
     2034        }
     2035}
     2036
     2037/* =========================================
     2038   My Account — Sidebar Navigation
     2039========================================= */
     2040.woocommerce-MyAccount-navigation {
     2041        background-color: var(--km-surface);
     2042        border: 1px solid var(--km-border);
     2043        border-radius: 16px;
     2044        padding: 0.75rem;
     2045        position: sticky;
     2046        top: 110px;
     2047        box-sizing: border-box;
     2048}
     2049
     2050.woocommerce-MyAccount-navigation ul {
     2051        list-style: none;
     2052        margin: 0;
     2053        padding: 0;
     2054        display: flex;
     2055        flex-direction: column;
     2056        gap: 0.2rem;
     2057}
     2058
     2059.woocommerce-MyAccount-navigation-link a {
     2060        display: flex;
     2061        align-items: center;
     2062        gap: 0.75rem;
     2063        padding: 0.75rem 1rem;
     2064        border-radius: 10px;
     2065        color: var(--km-primary);
     2066        font-weight: 500;
     2067        font-size: 0.95rem;
     2068        white-space: nowrap;
     2069        transition: background-color 0.2s ease, color 0.2s ease;
     2070}
     2071
     2072.woocommerce-MyAccount-navigation-link a::before {
     2073        content: "";
     2074        width: 18px;
     2075        height: 18px;
     2076        flex-shrink: 0;
     2077        background-color: currentColor;
     2078        opacity: 0.65;
     2079        -webkit-mask-size: contain;
     2080        mask-size: contain;
     2081        -webkit-mask-repeat: no-repeat;
     2082        mask-repeat: no-repeat;
     2083        -webkit-mask-position: center;
     2084        mask-position: center;
     2085        transition: opacity 0.2s ease;
     2086}
     2087
     2088.woocommerce-MyAccount-navigation-link:hover a {
     2089        background-color: rgba(0, 150, 136, 0.08);
     2090        color: var(--km-secondary);
     2091}
     2092
     2093.woocommerce-MyAccount-navigation-link.is-active a {
     2094        background-color: var(--km-secondary);
     2095        color: #ffffff;
     2096}
     2097
     2098.woocommerce-MyAccount-navigation-link.is-active a::before,
     2099.woocommerce-MyAccount-navigation-link:hover a::before {
     2100        opacity: 1;
     2101}
     2102
     2103.woocommerce-MyAccount-navigation-link--dashboard a::before {
     2104        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'%3E%3C/path%3E%3Cpolyline points='9 22 9 12 15 12 15 22'%3E%3C/polyline%3E%3C/svg%3E");
     2105        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'%3E%3C/path%3E%3Cpolyline points='9 22 9 12 15 12 15 22'%3E%3C/polyline%3E%3C/svg%3E");
     2106}
     2107
     2108.woocommerce-MyAccount-navigation-link--orders a::before {
     2109        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='16.5' y1='9.4' x2='7.5' y2='4.21'%3E%3C/line%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'%3E%3C/path%3E%3Cpolyline points='3.27 6.96 12 12.01 20.73 6.96'%3E%3C/polyline%3E%3Cline x1='12' y1='22.08' x2='12' y2='12'%3E%3C/line%3E%3C/svg%3E");
     2110        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='16.5' y1='9.4' x2='7.5' y2='4.21'%3E%3C/line%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'%3E%3C/path%3E%3Cpolyline points='3.27 6.96 12 12.01 20.73 6.96'%3E%3C/polyline%3E%3Cline x1='12' y1='22.08' x2='12' y2='12'%3E%3C/line%3E%3C/svg%3E");
     2111}
     2112
     2113.woocommerce-MyAccount-navigation-link--downloads a::before {
     2114        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='7 10 12 15 17 10'%3E%3C/polyline%3E%3Cline x1='12' y1='15' x2='12' y2='3'%3E%3C/line%3E%3C/svg%3E");
     2115        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='7 10 12 15 17 10'%3E%3C/polyline%3E%3Cline x1='12' y1='15' x2='12' y2='3'%3E%3C/line%3E%3C/svg%3E");
     2116}
     2117
     2118.woocommerce-MyAccount-navigation-link--edit-address a::before {
     2119        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'%3E%3C/path%3E%3Ccircle cx='12' cy='10' r='3'%3E%3C/circle%3E%3C/svg%3E");
     2120        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'%3E%3C/path%3E%3Ccircle cx='12' cy='10' r='3'%3E%3C/circle%3E%3C/svg%3E");
     2121}
     2122
     2123.woocommerce-MyAccount-navigation-link--payment-methods a::before {
     2124        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='4' width='22' height='16' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='1' y1='10' x2='23' y2='10'%3E%3C/line%3E%3C/svg%3E");
     2125        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='4' width='22' height='16' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='1' y1='10' x2='23' y2='10'%3E%3C/line%3E%3C/svg%3E");
     2126}
     2127
     2128.woocommerce-MyAccount-navigation-link--edit-account a::before {
     2129        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
     2130        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
     2131}
     2132
     2133.woocommerce-MyAccount-navigation-link--customer-logout {
     2134        margin-block-start: 0.4rem;
     2135        padding-block-start: 0.5rem;
     2136        border-block-start: 1px solid var(--km-border);
     2137}
     2138
     2139.woocommerce-MyAccount-navigation-link--customer-logout a {
     2140        color: #c0392b;
     2141}
     2142
     2143.woocommerce-MyAccount-navigation-link--customer-logout a::before {
     2144        background-color: #c0392b;
     2145        opacity: 0.7;
     2146        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'%3E%3C/path%3E%3Cpolyline points='16 17 21 12 16 7'%3E%3C/polyline%3E%3Cline x1='21' y1='12' x2='9' y2='12'%3E%3C/line%3E%3C/svg%3E");
     2147        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'%3E%3C/path%3E%3Cpolyline points='16 17 21 12 16 7'%3E%3C/polyline%3E%3Cline x1='21' y1='12' x2='9' y2='12'%3E%3C/line%3E%3C/svg%3E");
     2148}
     2149
     2150.woocommerce-MyAccount-navigation-link--customer-logout:hover a {
     2151        background-color: #fdecea;
     2152        color: #c0392b;
     2153}
     2154
     2155.woocommerce-MyAccount-navigation-link--customer-logout:hover a::before {
     2156        opacity: 1;
     2157}
     2158
     2159.rtl .woocommerce-MyAccount-navigation-link--customer-logout a::before {
     2160        transform: scaleX(-1);
     2161}
     2162
     2163@media screen and (max-width: 860px) {
     2164        .woocommerce-MyAccount-navigation {
     2165                position: static;
     2166                padding: 0.5rem;
     2167        }
     2168
     2169        .woocommerce-MyAccount-navigation ul {
     2170                flex-direction: row;
     2171                overflow-x: auto;
     2172                gap: 0.4rem;
     2173                -ms-overflow-style: none;
     2174                scrollbar-width: none;
     2175        }
     2176
     2177        .woocommerce-MyAccount-navigation ul::-webkit-scrollbar {
     2178                display: none;
     2179        }
     2180
     2181        .woocommerce-MyAccount-navigation-link {
     2182                flex-shrink: 0;
     2183        }
     2184
     2185        .woocommerce-MyAccount-navigation-link a {
     2186                white-space: nowrap;
     2187                padding: 0.65rem 0.9rem;
     2188        }
     2189
     2190        .woocommerce-MyAccount-navigation-link--customer-logout {
     2191                margin-block-start: 0;
     2192                padding-block-start: 0;
     2193                border-block-start: none;
     2194                border-inline-start: 1px solid var(--km-border);
     2195                padding-inline-start: 0.4rem;
     2196        }
     2197}
     2198
     2199/* =========================================
     2200   My Account — Content Panel
     2201========================================= */
     2202.woocommerce-MyAccount-content {
     2203        background-color: var(--km-surface);
     2204        border: 1px solid var(--km-border);
     2205        border-radius: 16px;
     2206        padding: 2rem;
     2207        min-width: 0;
     2208}
     2209
     2210.woocommerce-MyAccount-content > p:first-child {
     2211        margin-block-start: 0;
     2212}
     2213
     2214.woocommerce-MyAccount-content mark {
     2215        background: none;
     2216        color: var(--km-secondary);
     2217        font-weight: 700;
     2218}
     2219
     2220@media screen and (max-width: 600px) {
     2221        .woocommerce-MyAccount-content {
     2222                padding: 1.25rem;
     2223        }
     2224}
     2225
     2226/* =========================================
     2227   My Account — Orders Table
     2228========================================= */
     2229
     2230/* Allow the table to scroll horizontally instead of squeezing its
     2231   columns/text together when the panel is narrower than the table
     2232   needs (rather than depending on a wide global container). */
     2233.woocommerce-MyAccount-content {
     2234        overflow-x: auto;
     2235}
     2236
     2237.woocommerce-orders-table,
     2238.woocommerce-table--order-downloads {
     2239        min-width: 620px;
     2240}
     2241
     2242/* Status badge — WooCommerce prints the status label as plain text
     2243   inside the cell (no wrapping <mark>), so the colour comes from the
     2244   status class WooCommerce puts on the row itself. The mark.order-status
     2245   rule below is kept as a fallback for setups/plugins that do output it. */
     2246.woocommerce-orders-table__cell-order-status,
     2247.woocommerce-orders-table .order-status,
     2248.woocommerce-MyAccount-content mark.order-status {
     2249        display: inline-block;
     2250        padding: 0.3rem 0.9rem;
     2251        border-radius: 999px;
     2252        font-size: 0.8rem;
     2253        font-weight: 700;
     2254        background: none;
     2255        white-space: nowrap;
     2256}
     2257
     2258.woocommerce-orders-table__row--status-completed .woocommerce-orders-table__cell-order-status,
     2259.order-status.status-completed {
     2260        background-color: #e8f6f3;
     2261        color: #009688 !important;
     2262}
     2263
     2264.woocommerce-orders-table__row--status-processing .woocommerce-orders-table__cell-order-status,
     2265.order-status.status-processing {
     2266        background-color: #e8f0fe;
     2267        color: #2563eb !important;
     2268}
     2269
     2270.woocommerce-orders-table__row--status-on-hold .woocommerce-orders-table__cell-order-status,
     2271.order-status.status-on-hold {
     2272        background-color: #fff4e5;
     2273        color: #c47e0b !important;
     2274}
     2275
     2276.woocommerce-orders-table__row--status-pending .woocommerce-orders-table__cell-order-status,
     2277.order-status.status-pending {
     2278        background-color: #f3f4f6;
     2279        color: #6b7280 !important;
     2280}
     2281
     2282.woocommerce-orders-table__row--status-cancelled .woocommerce-orders-table__cell-order-status,
     2283.woocommerce-orders-table__row--status-failed .woocommerce-orders-table__cell-order-status,
     2284.order-status.status-cancelled,
     2285.order-status.status-failed {
     2286        background-color: #fdecea;
     2287        color: #c0392b !important;
     2288}
     2289
     2290.woocommerce-orders-table__row--status-refunded .woocommerce-orders-table__cell-order-status,
     2291.order-status.status-refunded {
     2292        background-color: #eef2ff;
     2293        color: #4f46e5 !important;
     2294}
     2295
     2296.woocommerce-orders-table__cell-order-actions .button,
     2297.woocommerce-MyAccount-content .woocommerce-orders-table .button {
     2298        padding: 0.4rem 1rem !important;
     2299        font-size: 0.8rem !important;
     2300        margin-inline-end: 0.35rem;
     2301        margin-block-end: 0.35rem;
     2302        white-space: nowrap;
     2303}
     2304
     2305.woocommerce-orders-table__cell-order-total {
     2306        white-space: nowrap;
     2307}
     2308
     2309.woocommerce-orders-table__cell-order-number,
     2310.woocommerce-orders-table__cell-order-date {
     2311        white-space: nowrap;
     2312}
     2313
     2314/* =========================================
     2315   My Account — Downloads
     2316========================================= */
     2317.woocommerce-table--order-downloads .download-product a {
     2318        color: var(--km-primary);
     2319        font-weight: 600;
     2320}
     2321
     2322.woocommerce-table--order-downloads td.download-remaining,
     2323.woocommerce-table--order-downloads td.download-expires {
     2324        color: var(--km-text-light);
     2325        font-size: 0.9rem;
     2326}
     2327
     2328.woocommerce-table--order-downloads a.woocommerce-MyAccount-downloads-file {
     2329        display: inline-flex;
     2330        align-items: center;
     2331        gap: 0.5rem;
     2332        background-color: var(--km-secondary) !important;
     2333        color: #ffffff !important;
     2334        padding: 0.55rem 1.2rem !important;
     2335        border-radius: 8px !important;
     2336        font-weight: 600 !important;
     2337        font-size: 0.85rem !important;
     2338        transition: background-color 0.2s ease, transform 0.2s ease;
     2339}
     2340
     2341.woocommerce-table--order-downloads a.woocommerce-MyAccount-downloads-file:hover {
     2342        background-color: var(--km-primary) !important;
     2343        transform: translateY(-1px);
     2344}
     2345
     2346.woocommerce-table--order-downloads a.woocommerce-MyAccount-downloads-file::before {
     2347        content: "";
     2348        width: 15px;
     2349        height: 15px;
     2350        flex-shrink: 0;
     2351        background-color: currentColor;
     2352        -webkit-mask-size: contain;
     2353        mask-size: contain;
     2354        -webkit-mask-repeat: no-repeat;
     2355        mask-repeat: no-repeat;
     2356        -webkit-mask-position: center;
     2357        mask-position: center;
     2358        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='7 10 12 15 17 10'%3E%3C/polyline%3E%3Cline x1='12' y1='15' x2='12' y2='3'%3E%3C/line%3E%3C/svg%3E");
     2359        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='7 10 12 15 17 10'%3E%3C/polyline%3E%3Cline x1='12' y1='15' x2='12' y2='3'%3E%3C/line%3E%3C/svg%3E");
     2360}
     2361
     2362/* =========================================
     2363   My Account — Addresses
     2364========================================= */
     2365.woocommerce-Addresses {
     2366        display: grid;
     2367        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
     2368        gap: 1.5rem;
     2369}
     2370
     2371.woocommerce-Address {
     2372        background-color: var(--km-background);
     2373        border: 1px solid var(--km-border);
     2374        border-radius: 12px;
     2375        padding: 1.5rem;
     2376}
     2377
     2378.woocommerce-Address-title {
     2379        display: flex;
     2380        align-items: center;
     2381        justify-content: space-between;
     2382        gap: 0.75rem;
     2383        margin-block-end: 1rem;
     2384}
     2385
     2386.woocommerce-Address-title h2,
     2387.woocommerce-Address-title h3 {
     2388        margin: 0;
     2389        font-size: 1.1rem;
     2390        color: var(--km-primary);
     2391}
     2392
     2393.woocommerce-Address-title a {
     2394        flex-shrink: 0;
     2395        font-size: 0.8rem;
     2396        font-weight: 600;
     2397        padding: 0.35rem 0.9rem;
     2398        border: 1px solid var(--km-secondary);
     2399        border-radius: 999px;
     2400        color: var(--km-secondary) !important;
     2401        text-decoration: none !important;
     2402        transition: all 0.2s ease;
     2403}
     2404
     2405.woocommerce-Address-title a:hover {
     2406        background-color: var(--km-secondary);
     2407        color: #ffffff !important;
     2408}
     2409
     2410.woocommerce-Address address {
     2411        font-style: normal;
     2412        line-height: 1.9;
     2413        color: #444444;
     2414}
     2415
     2416/* =========================================
     2417   My Account — Forms (Account Details, Addresses,
     2418   Login, Register, Reset Password)
     2419========================================= */
     2420.woocommerce-account form .form-row {
     2421        margin-block-end: 1.25rem;
     2422}
     2423
     2424.woocommerce-account form label {
     2425        display: block;
     2426        margin-block-end: 0.4rem;
     2427        font-weight: 600;
     2428        font-size: 0.9rem;
     2429        color: var(--km-primary);
     2430}
     2431
     2432.woocommerce-account form .input-text,
     2433.woocommerce-account form select,
     2434.woocommerce-account form textarea {
     2435        width: 100%;
     2436        padding: 0.75rem 1rem;
     2437        border: 1px solid var(--km-border);
     2438        border-radius: 8px;
     2439        font-family: var(--km-font-family);
     2440        background-color: var(--km-surface);
     2441        color: var(--km-primary);
     2442        transition: border-color 0.2s ease, box-shadow 0.2s ease;
     2443}
     2444
     2445.woocommerce-account form .input-text:focus,
     2446.woocommerce-account form select:focus,
     2447.woocommerce-account form textarea:focus {
     2448        outline: none;
     2449        border-color: var(--km-secondary);
     2450        box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.12);
     2451}
     2452
     2453.woocommerce-account form .password-input {
     2454        position: relative;
     2455        display: block;
     2456}
     2457
     2458.woocommerce-account .col2-set {
     2459        display: grid;
     2460        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
     2461        gap: 2rem;
     2462}
     2463
     2464.woocommerce-account .col2-set .col-1,
     2465.woocommerce-account .col2-set .col-2 {
     2466        background-color: var(--km-surface);
     2467        border: 1px solid var(--km-border);
     2468        border-radius: 16px;
     2469        padding: 2rem;
     2470}
     2471
     2472.woocommerce-account .col2-set h2 {
     2473        margin-block-start: 0;
     2474        font-size: 1.3rem;
     2475        color: var(--km-primary);
     2476}
     2477
     2478.woocommerce-account .woocommerce-form-row--wide,
     2479.woocommerce-account .form-row-wide {
     2480        width: 100%;
     2481}
     2482
     2483.woocommerce-account .woocommerce-form__label-for-checkbox {
     2484        display: flex !important;
     2485        align-items: center;
     2486        gap: 0.5rem;
     2487        font-weight: 400 !important;
     2488        cursor: pointer;
     2489}
     2490
     2491.woocommerce-account .woocommerce-form__input-checkbox {
     2492        width: auto;
     2493        margin: 0;
     2494}
     2495
     2496.woocommerce-account .lost_password {
     2497        margin-block-start: 0.75rem;
     2498        font-size: 0.9rem;
     2499}
     2500
     2501@media screen and (max-width: 600px) {
     2502        .woocommerce-account .col2-set .col-1,
     2503        .woocommerce-account .col2-set .col-2 {
     2504                padding: 1.5rem;
     2505        }
     2506}
  • kabook-mind/1.1.0/assets/js/navigation.js

    r341174 r344069  
    5757                        }
    5858                } );
     59
     60                /**
     61                 * Add dropdown toggle buttons to menu items that have children,
     62                 * so nested sub-menus can be opened with a tap on small screens
     63                 * (hover/focus-within alone is not usable on touch devices).
     64                 */
     65                const menuItemsWithChildren = menu.querySelectorAll( '.menu-item-has-children, .page_item_has_children' );
     66
     67                menuItemsWithChildren.forEach( function( menuItem ) {
     68                        const subMenu = menuItem.querySelector( ':scope > ul.sub-menu, :scope > ul.children' );
     69
     70                        if ( ! subMenu ) {
     71                                return;
     72                        }
     73
     74                        const toggleButton = document.createElement( 'button' );
     75                        toggleButton.classList.add( 'sub-menu-toggle' );
     76                        toggleButton.setAttribute( 'aria-expanded', 'false' );
     77                        toggleButton.setAttribute(
     78                                'aria-label',
     79                                ( kabookMindNav && kabookMindNav.expandLabel ) ? kabookMindNav.expandLabel : 'Open sub-menu'
     80                        );
     81                        toggleButton.innerHTML = '<span class="sub-menu-toggle-icon" aria-hidden="true"></span>';
     82
     83                        menuItem.insertBefore( toggleButton, subMenu );
     84                        menuItem.classList.add( 'has-sub-menu-toggle' );
     85
     86                        toggleButton.addEventListener( 'click', function( event ) {
     87                                event.preventDefault();
     88                                event.stopPropagation();
     89
     90                                const isOpen = menuItem.classList.toggle( 'sub-menu-toggled-on' );
     91                                toggleButton.setAttribute( 'aria-expanded', isOpen ? 'true' : 'false' );
     92                        } );
     93                } );
    5994        } );
    6095
  • kabook-mind/1.1.0/footer.php

    r341174 r344069  
    6565                                                                esc_html__( 'Theme: %1$s by %2$s.', 'kabook-mind' ),
    6666                                                                'Kabook Mind',
    67                                                                 '<a href="' . esc_url( 'https://www.kabook.ir/about-as/' ) . '">Saeed Afshari</a>'
     67                                                                '<a href="' . esc_url( 'https://profiles.wordpress.org/saeidafshari' ) . '">Saeed Afshari</a>'
    6868                                                        );
    6969                                                endif;
  • kabook-mind/1.1.0/functions.php

    r341174 r344069  
    2121if ( ! defined( 'KABOOK_MIND_VERSION' ) ) {
    2222        // Replace the version number of the theme on each release.
    23         define( 'KABOOK_MIND_VERSION', '1.0.0' );
     23        define( 'KABOOK_MIND_VERSION', '1.1.0' );
    2424}
    2525
    … …  
    3636 */
    3737$kabook_mind_includes = array(
    38         'inc/setup.php',      // Core theme setup and support.
    39         'inc/enqueue.php',    // Styles and scripts registration.
    40         'inc/customizer.php', // Customizer settings.
    41         'inc/widgets.php',    // Sidebar and widget areas.
     38        'inc/setup.php',          // Core theme setup and support.
     39        'inc/enqueue.php',        // Styles and scripts registration.
     40        'inc/customizer.php',     // Customizer settings.
     41        'inc/widgets.php',        // Sidebar and widget areas.
     42        'inc/block-patterns.php', // Block patterns and block styles.
     43        'inc/header-search.php',  // Header search icon and overlay.
    4244);
    4345
  • kabook-mind/1.1.0/header.php

    r341174 r344069  
    3636
    3737        <header id="masthead" class="site-header">
     38                <?php if ( get_header_image() ) : ?>
     39                        <div class="site-header-image">
     40                                <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
     41                                        <img src="<?php header_image(); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>">
     42                                </a>
     43                        </div>
     44                <?php endif; ?>
    3845                <div class="header-container">
    3946                       
    … …  
    93100                                );
    94101                                ?>
    95                         </nav></div></header>
     102                        </nav><?php if ( get_theme_mod( 'km_show_header_search', true ) || ( class_exists( 'WooCommerce' ) && get_theme_mod( 'km_show_header_cart', true ) ) ) : ?>
     103                        <div class="header-actions km-header-actions">
     104                                <?php
     105                                kabook_mind_header_search_toggle();
     106
     107                                if ( class_exists( 'WooCommerce' ) && get_theme_mod( 'km_show_header_cart', true ) ) :
     108                                        kabook_mind_header_cart();
     109                                endif;
     110                                ?>
     111                        </div>
     112                        <?php endif; ?>
     113                </div></header>
  • kabook-mind/1.1.0/inc/customizer.php

    r341174 r344069  
    5959        }
    6060
     61        // Header Cart Icon: show/hide the WooCommerce cart icon in the header (only relevant when WooCommerce is active).
     62        if ( class_exists( 'WooCommerce' ) ) {
     63                $wp_customize->add_setting(
     64                        'km_show_header_cart',
     65                        array(
     66                                'default'           => true,
     67                                'sanitize_callback' => 'wp_validate_boolean',
     68                        )
     69                );
     70
     71                $wp_customize->add_control(
     72                        'km_show_header_cart',
     73                        array(
     74                                'label'    => esc_html__( 'Show Cart Icon in Header', 'kabook-mind' ),
     75                                'section'  => 'kabook_mind_section_header',
     76                                'type'     => 'checkbox',
     77                                'priority' => 2,
     78                        )
     79                );
     80        }
     81
     82        // Header Search Icon: show/hide the search icon (opens an overlay search box) in the header.
     83        $wp_customize->add_setting(
     84                'km_show_header_search',
     85                array(
     86                        'default'           => true,
     87                        'sanitize_callback' => 'wp_validate_boolean',
     88                )
     89        );
     90
     91        $wp_customize->add_control(
     92                'km_show_header_search',
     93                array(
     94                        'label'    => esc_html__( 'Show Search Icon in Header', 'kabook-mind' ),
     95                        'section'  => 'kabook_mind_section_header',
     96                        'type'     => 'checkbox',
     97                        'priority' => 3,
     98                )
     99        );
     100
    61101        // Header Content: choose whether to show the logo, the site title, or both.
    62102        $wp_customize->add_setting(
    … …  
    630670        );
    631671
    632         // Footer Copyright Text.
     672// Footer Copyright Text.
    633673        $wp_customize->add_setting(
    634674                'km_footer_text',
    … …  
    643683                array(
    644684                        'label'       => esc_html__( 'Footer Copyright Text', 'kabook-mind' ),
    645                         'description' => esc_html__( 'Basic HTML is allowed, e.g. <a href="https://example.com">link text</a>, <strong>, <em>.', 'kabook-mind' ),
     685                        'description' => esc_html__( 'Basic HTML is allowed, such as links, bold, and italic text.', 'kabook-mind' ),
    646686                        'section'     => 'kabook_mind_section_footer',
    647687                        'type'        => 'textarea',
  • kabook-mind/1.1.0/inc/enqueue.php

    r341174 r344069  
    3737                wp_enqueue_script( 'kabook-mind-navigation', get_template_directory_uri() . '/assets/js/navigation.js', array(), $kabook_mind_version, true );
    3838
     39                // Provide a translatable label for the mobile sub-menu toggle button.
     40                wp_localize_script(
     41                        'kabook-mind-navigation',
     42                        'kabookMindNav',
     43                        array(
     44                                'expandLabel' => esc_html__( 'Open sub-menu', 'kabook-mind' ),
     45                        )
     46                );
     47
    3948                // Enqueue the header shrink-on-scroll behavior, only when both the
    4049                // sticky header and the shrink option are enabled in the Customizer.
    … …  
    4352                }
    4453
     54                // Enqueue the header search overlay toggle script, only when the
     55                // header search icon is enabled in the Customizer.
     56                if ( get_theme_mod( 'km_show_header_search', true ) ) {
     57                        wp_enqueue_script( 'kabook-mind-header-search', get_template_directory_uri() . '/assets/js/header-search.js', array(), $kabook_mind_version, true );
     58                }
     59
    4560                // Enqueue comment-reply script for threaded comments support.
    4661                if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
    4762                        wp_enqueue_script( 'comment-reply' );
    4863                }
     64
     65                // Enqueue the header cart badge animation, only when WooCommerce is active.
     66                if ( class_exists( 'WooCommerce' ) ) {
     67                        wp_enqueue_script( 'kabook-mind-woo-cart', get_template_directory_uri() . '/assets/js/woo-cart.js', array( 'jquery' ), $kabook_mind_version, true );
     68                }
    4969        }
    5070endif;
  • kabook-mind/1.1.0/inc/setup.php

    r341174 r344069  
    5151                add_theme_support( 'post-thumbnails' );
    5252
    53                 // This theme uses wp_nav_menu() in two locations.
     53                // This theme uses wp_nav_menu() in one location; the same menu is
     54                // fully responsive and adapts to small screens on its own.
    5455                register_nav_menus(
    5556                        array(
    5657                                'menu-1' => esc_html__( 'Primary Menu', 'kabook-mind' ),
    57                                 'mobile' => esc_html__( 'Mobile Menu', 'kabook-mind' ),
    5858                        )
    5959                );
    … …  
    102102                add_editor_style( 'assets/css/editor-style.css' );
    103103
     104                /**
     105                 * Add support for an optional custom header image.
     106                 * Site branding is handled by the Custom Logo above; this lets a
     107                 * site owner also add a decorative header banner if they want one.
     108                 *
     109                 * @link https://developer.wordpress.org/themes/functionality/custom-headers/
     110                 */
     111                add_theme_support(
     112                        'custom-header',
     113                        apply_filters(
     114                                'kabook_mind_custom_header_args',
     115                                array(
     116                                        'default-image'         => '',
     117                                        'default-text-color'    => '1a1a1a',
     118                                        'width'                 => 1600,
     119                                        'height'                => 400,
     120                                        'flex-width'            => true,
     121                                        'flex-height'           => true,
     122                                        'header-text'           => false,
     123                                        'uploads'               => true,
     124                                )
     125                        )
     126                );
     127
     128                /**
     129                 * Add support for a custom background color or image.
     130                 *
     131                 * @link https://developer.wordpress.org/themes/functionality/custom-backgrounds/
     132                 */
     133                add_theme_support(
     134                        'custom-background',
     135                        apply_filters(
     136                                'kabook_mind_custom_background_args',
     137                                array(
     138                                        'default-color' => 'ffffff',
     139                                        'default-image' => '',
     140                                )
     141                        )
     142                );
     143
    104144                /*
    105145                 * WooCommerce Support
  • kabook-mind/1.1.0/inc/woocommerce.php

    r341174 r344069  
    8989}
    9090add_filter( 'woocommerce_output_related_products_args', 'kabook_mind_related_products_args', 20 );
     91
     92/*
     93 * =====================================================================
     94 * 3. Header Cart Icon (with live item-count badge).
     95 * =====================================================================
     96 */
     97if ( ! function_exists( 'kabook_mind_header_cart' ) ) {
     98        /**
     99         * Output the header cart icon link.
     100         *
     101         * The count bubble is wrapped in the WooCommerce fragment markup so it
     102         * refreshes instantly (no page reload) whenever a product is added to
     103         * the cart, as long as WooCommerce's AJAX add-to-cart is enabled.
     104         *
     105         * @return void
     106         */
     107        function kabook_mind_header_cart() {
     108                $km_count = WC()->cart ? WC()->cart->get_cart_contents_count() : 0;
     109                ?>
     110                <a href="<?php echo esc_url( wc_get_cart_url() ); ?>"
     111                        class="km-header-cart cart-contents"
     112                        aria-label="<?php esc_attr_e( 'View your shopping cart', 'kabook-mind' ); ?>">
     113                        <svg class="km-cart-icon" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
     114                                <circle cx="9" cy="21" r="1"></circle>
     115                                <circle cx="19" cy="21" r="1"></circle>
     116                                <path d="M1 1h3.2l2.68 13.4a2 2 0 0 0 2 1.6h9.44a2 2 0 0 0 2-1.6L22.4 5H5.12"></path>
     117                        </svg>
     118                        <span class="km-cart-count cart-contents-count"><?php echo absint( $km_count ); ?></span>
     119                </a>
     120                <?php
     121        }
     122}
     123
     124if ( ! function_exists( 'kabook_mind_cart_count_fragment' ) ) {
     125        /**
     126         * Refresh the header cart badge count via WooCommerce AJAX fragments,
     127         * so the number updates instantly after add-to-cart with no reload.
     128         *
     129         * @param array $fragments WooCommerce fragments.
     130         * @return array Modified fragments.
     131         */
     132        function kabook_mind_cart_count_fragment( $fragments ) {
     133                $km_count = WC()->cart ? WC()->cart->get_cart_contents_count() : 0;
     134
     135                ob_start();
     136                ?>
     137                <span class="km-cart-count cart-contents-count"><?php echo absint( $km_count ); ?></span>
     138                <?php
     139                $fragments['span.cart-contents-count'] = trim( ob_get_clean() );
     140
     141                return $fragments;
     142        }
     143}
     144add_filter( 'woocommerce_add_to_cart_fragments', 'kabook_mind_cart_count_fragment' );
     145
     146/*
     147 * =====================================================================
     148 * 4. Shop / Archive Enhancements.
     149 * =====================================================================
     150 */
     151if ( ! function_exists( 'kabook_mind_sale_flash' ) ) {
     152        /**
     153         * Replace the default "Sale!" flash with a percentage-off badge when
     154         * a simple product's discount can be calculated, falling back to the
     155         * theme-styled "Sale" label otherwise.
     156         *
     157         * @param string     $html    Original sale flash HTML.
     158         * @param WP_Post    $post    Product post object.
     159         * @param WC_Product $product Product object.
     160         * @return string Modified sale flash HTML.
     161         */
     162        function kabook_mind_sale_flash( $html, $post, $product ) {
     163                if ( ! $product instanceof WC_Product ) {
     164                        return $html;
     165                }
     166
     167                $regular_price = (float) $product->get_regular_price();
     168                $sale_price    = (float) $product->get_sale_price();
     169
     170                if ( $regular_price > 0 && $sale_price > 0 && $sale_price < $regular_price ) {
     171                        $percent = round( ( ( $regular_price - $sale_price ) / $regular_price ) * 100 );
     172
     173                        return '<span class="onsale km-onsale-badge">-' . absint( $percent ) . '%</span>';
     174                }
     175
     176                return '<span class="onsale km-onsale-badge">' . esc_html__( 'Sale', 'kabook-mind' ) . '</span>';
     177        }
     178}
     179add_filter( 'woocommerce_sale_flash', 'kabook_mind_sale_flash', 10, 3 );
     180
     181if ( ! function_exists( 'kabook_mind_woocommerce_body_class' ) ) {
     182        /**
     183         * Add a helper class to the body on WooCommerce pages so extra layout
     184         * spacing rules can target shop/product pages without extra specificity.
     185         *
     186         * @param array $classes Existing body classes.
     187         * @return array Modified body classes.
     188         */
     189        function kabook_mind_woocommerce_body_class( $classes ) {
     190                if ( function_exists( 'is_woocommerce' ) && is_woocommerce() ) {
     191                        $classes[] = 'km-woocommerce-page';
     192                }
     193
     194                return $classes;
     195        }
     196}
     197add_filter( 'body_class', 'kabook_mind_woocommerce_body_class' );
     198
     199if ( ! function_exists( 'kabook_mind_product_trust_bar' ) ) {
     200        /**
     201         * Output a short trust/shipping info bar under the single product
     202         * add-to-cart form (secure payment, delivery, and return policy notes).
     203         *
     204         * @return void
     205         */
     206        function kabook_mind_product_trust_bar() {
     207                ?>
     208                <div class="km-product-trust-bar">
     209                        <span class="km-trust-item">
     210                                <?php esc_html_e( 'Fast, reliable delivery', 'kabook-mind' ); ?>
     211                        </span>
     212                        <span class="km-trust-item">
     213                                <?php esc_html_e( 'Secure checkout', 'kabook-mind' ); ?>
     214                        </span>
     215                        <span class="km-trust-item">
     216                                <?php esc_html_e( 'Easy returns', 'kabook-mind' ); ?>
     217                        </span>
     218                </div>
     219                <?php
     220        }
     221}
     222add_action( 'woocommerce_single_product_summary', 'kabook_mind_product_trust_bar', 35 );
     223
     224/*
     225 * =====================================================================
     226 * 5. Basic On-Page SEO for Shop & Product Pages.
     227 *
     228 * Only runs when no dedicated SEO plugin is active, to avoid duplicate
     229 * meta tags / structured data on sites that already use Yoast, Rank Math,
     230 * All in One SEO, SEOPress, etc.
     231 * =====================================================================
     232 */
     233if ( ! function_exists( 'kabook_mind_has_seo_plugin' ) ) {
     234        /**
     235         * Detect whether a major SEO plugin is already active.
     236         *
     237         * @return bool True if a known SEO plugin is active.
     238         */
     239        function kabook_mind_has_seo_plugin() {
     240                return defined( 'WPSEO_VERSION' )        // Yoast SEO.
     241                        || defined( 'RANK_MATH_VERSION' )     // Rank Math.
     242                        || defined( 'AIOSEO_VERSION' )        // All in One SEO.
     243                        || class_exists( 'SEOPress' );        // SEOPress.
     244        }
     245}
     246
     247if ( ! function_exists( 'kabook_mind_meta_description' ) ) {
     248        /**
     249         * Output a meta description tag for products, posts, and pages when no
     250         * SEO plugin is handling it already.
     251         *
     252         * @return void
     253         */
     254        function kabook_mind_meta_description() {
     255                if ( kabook_mind_has_seo_plugin() || is_admin() ) {
     256                        return;
     257                }
     258
     259                $km_description = '';
     260
     261                if ( function_exists( 'is_product' ) && is_product() ) {
     262                        global $product;
     263                        if ( ! $product instanceof WC_Product ) {
     264                                $product = wc_get_product( get_the_ID() );
     265                        }
     266                        if ( $product instanceof WC_Product ) {
     267                                $km_description = wp_strip_all_tags( $product->get_short_description() ? $product->get_short_description() : $product->get_description() );
     268                        }
     269                } elseif ( is_singular() ) {
     270                        $km_description = has_excerpt() ? get_the_excerpt() : wp_strip_all_tags( get_the_content() );
     271                } elseif ( function_exists( 'is_shop' ) && is_shop() ) {
     272                        $km_description = get_bloginfo( 'description' );
     273                }
     274
     275                $km_description = trim( wp_strip_all_tags( $km_description ) );
     276
     277                if ( empty( $km_description ) ) {
     278                        return;
     279                }
     280
     281                $km_description = wp_trim_words( $km_description, 35, '…' );
     282
     283                printf( '<meta name="description" content="%s">' . "\n", esc_attr( $km_description ) );
     284        }
     285}
     286add_action( 'wp_head', 'kabook_mind_meta_description', 1 );
     287
     288if ( ! function_exists( 'kabook_mind_open_graph_tags' ) ) {
     289        /**
     290         * Output basic Open Graph / Twitter Card meta tags for product pages.
     291         *
     292         * @return void
     293         */
     294        function kabook_mind_open_graph_tags() {
     295                if ( kabook_mind_has_seo_plugin() || is_admin() || ! function_exists( 'is_product' ) || ! is_product() ) {
     296                        return;
     297                }
     298
     299                global $product;
     300                if ( ! $product instanceof WC_Product ) {
     301                        $product = wc_get_product( get_the_ID() );
     302                }
     303                if ( ! $product instanceof WC_Product ) {
     304                        return;
     305                }
     306
     307                $km_image_id  = $product->get_image_id();
     308                $km_image_url = $km_image_id ? wp_get_attachment_image_url( $km_image_id, 'large' ) : '';
     309                $km_title     = $product->get_name();
     310                $km_desc      = wp_trim_words( wp_strip_all_tags( $product->get_short_description() ? $product->get_short_description() : $product->get_description() ), 30, '…' );
     311                ?>
     312                <meta property="og:type" content="product">
     313                <meta property="og:title" content="<?php echo esc_attr( $km_title ); ?>">
     314                <?php if ( $km_desc ) : ?>
     315                <meta property="og:description" content="<?php echo esc_attr( $km_desc ); ?>">
     316                <?php endif; ?>
     317                <meta property="og:url" content="<?php echo esc_url( get_permalink() ); ?>">
     318                <?php if ( $km_image_url ) : ?>
     319                <meta property="og:image" content="<?php echo esc_url( $km_image_url ); ?>">
     320                <?php endif; ?>
     321                <meta property="product:price:amount" content="<?php echo esc_attr( $product->get_price() ); ?>">
     322                <meta property="product:price:currency" content="<?php echo esc_attr( get_woocommerce_currency() ); ?>">
     323                <meta name="twitter:card" content="summary_large_image">
     324                <?php
     325        }
     326}
     327add_action( 'wp_head', 'kabook_mind_open_graph_tags', 2 );
     328
     329if ( ! function_exists( 'kabook_mind_product_schema' ) ) {
     330        /**
     331         * Output basic Product structured data (JSON-LD) for single product
     332         * pages, so search engines can display price, availability, and
     333         * rating rich results.
     334         *
     335         * @return void
     336         */
     337        function kabook_mind_product_schema() {
     338                if ( kabook_mind_has_seo_plugin() || is_admin() || ! function_exists( 'is_product' ) || ! is_product() ) {
     339                        return;
     340                }
     341
     342                global $product;
     343                if ( ! $product instanceof WC_Product ) {
     344                        $product = wc_get_product( get_the_ID() );
     345                }
     346                if ( ! $product instanceof WC_Product ) {
     347                        return;
     348                }
     349
     350                $km_image_id  = $product->get_image_id();
     351                $km_image_url = $km_image_id ? wp_get_attachment_image_url( $km_image_id, 'large' ) : '';
     352
     353                $km_schema = array(
     354                        '@context'    => 'https://schema.org/',
     355                        '@type'       => 'Product',
     356                        'name'        => $product->get_name(),
     357                        'sku'         => $product->get_sku(),
     358                        'description' => wp_strip_all_tags( $product->get_short_description() ? $product->get_short_description() : $product->get_description() ),
     359                        'offers'      => array(
     360                                '@type'         => 'Offer',
     361                                'url'           => get_permalink(),
     362                                'priceCurrency' => get_woocommerce_currency(),
     363                                'price'         => $product->get_price(),
     364                                'availability'  => $product->is_in_stock() ? 'https://schema.org/InStock' : 'https://schema.org/OutOfStock',
     365                        ),
     366                );
     367
     368                if ( $km_image_url ) {
     369                        $km_schema['image'] = $km_image_url;
     370                }
     371
     372                if ( $product->get_average_rating() && (int) $product->get_rating_count() > 0 ) {
     373                        $km_schema['aggregateRating'] = array(
     374                                '@type'       => 'AggregateRating',
     375                                'ratingValue' => $product->get_average_rating(),
     376                                'reviewCount' => $product->get_rating_count(),
     377                        );
     378                }
     379
     380                echo '<script type="application/ld+json">' . wp_json_encode( $km_schema ) . '</script>' . "\n";
     381        }
     382}
     383add_action( 'wp_head', 'kabook_mind_product_schema', 3 );
  • kabook-mind/1.1.0/readme.txt

    r341174 r344069  
    11=== Kabook Mind ===
    22
    3 Contributors: saeedafshari
     3Contributors: saeidafshari
    44
    55Requires at least: 6.3
    … …  
    99Requires PHP: 7.4
    1010
    11 Version: 1.0.0
     11Version: 1.1.0
    1212
    1313License: GPLv2 or later
    … …  
    101101All PHP, CSS, and JavaScript files included in the theme are original work created specifically for Kabook Mind.
    102102
    103 The screenshot.png file is an original screenshot of the theme and is licensed under GPL v2 or later.
     103The screenshot.png file, including every photo shown in it, is entirely original work: it was designed by the theme author and all photos are the author's own personal photography. Copyright of the screenshot and its photos belongs to the theme author, Saeed Afshari, and it is licensed under GPL v2 or later along with the rest of the theme.
    104104
    105105== Changelog ==
    106106
     107= 1.1.0 =
     108
     109* New: Optional custom header image support (Appearance > Customize > Header Image).
     110* New: Optional custom background color/image support (Appearance > Customize > Background Image).
     111* Fix: Nested mobile navigation menu items are now reachable via a dedicated expand/collapse toggle button.
     112* Fix: Front-end credit link now matches the Author URI declared in style.css.
     113
    107114= 1.0.0 =
    108115
    109 * Initial public release.
    110 * Responsive layout.
    111 * Native RTL/LTR support using CSS Logical Properties.
    112 * WooCommerce integration.
    113 * Elementor compatible Full Width template.
    114 * Extensive WordPress Customizer options.
    115 * Sticky and Shrink Header support.
     116* Initial release.
     117* Responsive layout with a fully accessible, expandable mobile navigation menu (including nested sub-menus).
     118* Native RTL/LTR support using CSS Logical Properties (no separate rtl.css required).
     119* WooCommerce integration: styled shop archive, single product page, cart, checkout, and a redesigned My Account dashboard.
     120* Header search icon with a full-screen search overlay (toggleable from the Customizer).
     121* Header cart icon with a live item-count badge.
     122* Elementor compatible Full Width page template.
     123* Extensive WordPress Customizer options for header, logo, navigation, sidebar, colors, and typography.
     124* Sticky header with optional shrink-on-scroll behavior.
     125* Basic on-page SEO output (structured data and Open Graph/Twitter meta), automatically skipped when an SEO plugin is active.
     126* Four footer widget areas.
     127* Translation ready, with editor styles and wide/block styles support.
  • kabook-mind/1.1.0/style.css

    r341174 r344069  
    11/*
    22Theme Name: Kabook Mind
    3 Theme URI: https://www.kabook.ir/kabook-mind/
    43Author: Saeed Afshari
    5 Author URI: https://www.kabook.ir/
     4Author URI: https://profiles.wordpress.org/saeidafshari
    65Description: A lightweight, responsive WordPress theme for wellness, psychology, coaching, blogs, and business websites with WooCommerce, Elementor, native RTL/LTR support, and extensive customization options.
    7 Version: 1.0.0
     6Version: 1.1.0
    87Requires at least: 6.3
    98Tested up to: 7.0
Note: See TracChangeset for help on using the changeset viewer.