/*
Theme Name: Gift World Gifting
Theme URI: https://giftworldgifting.com
Author: Gift World Gifting
Description: Custom premium gifting theme for Gift World Gifting, Karachi. Built from the brand's original HTML/CSS design with full WooCommerce support, gifting checkout fields and midnight delivery.
Version: 4.0.6
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: giftworld
Tags: e-commerce, woocommerce, custom-menu, custom-logo, featured-images, translation-ready
WC requires at least: 7.0
WC tested up to: 9.0
*/

/* Page styles are loaded per template from assets/css/ (see functions.php).
   This file only carries the theme header plus a couple of safety resets. */

html {
  -webkit-text-size-adjust: 100%;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9999;
  padding: 12px 20px;
  background: #ffffff;
  color: #161616;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

/* Same logo size on every page (loads after the page stylesheets) */
@media (max-width:680px){
  #siteHeader .logo-img,
  #siteHeader .logo-link img{height:52px !important;width:auto !important;max-width:150px !important;}
  .mnav-top .logo-img{height:44px !important;width:auto !important;}
}

@media (max-width:680px){
  .hero .hero-ctas{gap:10px !important;row-gap:10px !important;}
}


/* ===== Shared header + Woo pages (cart, checkout, account) ===== */
#siteHeader .logo-img{height:104px;width:auto;max-width:none;}
body:not(.home) #siteHeader .logo-img{height:72px;}
header.shrink .logo-img,#siteHeader.shrink .logo-img{height:62px;}
@media (max-width:680px){
  #siteHeader .logo-img,body:not(.home) #siteHeader .logo-img{height:52px !important;}
}
.gw-cart-link{position:relative;display:inline-flex;align-items:center;justify-content:center;}
.gw-cart-count{
  position:absolute;top:-6px;right:-8px;min-width:18px;height:18px;padding:0 5px;
  border-radius:999px;background:#a1dcec;color:#0f2b35;
  font-size:10.5px;line-height:18px;font-weight:500;text-align:center;
}
.gw-cart-count[hidden]{display:none;}

body.woocommerce-cart #gw-main > *:not(.page-head):not(.announce),
body.woocommerce-checkout #gw-main > *:not(.page-head):not(.announce),
body.woocommerce-account #gw-main > *:not(.page-head):not(.announce),
.wp-block-woocommerce-cart,.wp-block-woocommerce-checkout,
.woocommerce-cart .woocommerce,.woocommerce-checkout .woocommerce,.woocommerce-account .woocommerce{
  max-width:1280px;margin-left:auto;margin-right:auto;padding-left:40px;padding-right:40px;box-sizing:border-box;
}
body.woocommerce-cart #gw-main,body.woocommerce-checkout #gw-main{padding-bottom:80px;}
@media (max-width:680px){
  body.woocommerce-cart #gw-main > *:not(.page-head):not(.announce),
  body.woocommerce-checkout #gw-main > *:not(.page-head):not(.announce),
  body.woocommerce-account #gw-main > *:not(.page-head):not(.announce),
  .wp-block-woocommerce-cart,.wp-block-woocommerce-checkout{padding-left:20px;padding-right:20px;}
}

/* Shop filter checkboxes */
.gw-filter-form .filter-opt{display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;}
.gw-filter-form .filter-opt > span:first-child{display:flex;align-items:center;gap:10px;}
.gw-filter-form input[type="checkbox"]{
  -webkit-appearance:none;appearance:none;width:18px;height:18px;margin:0;flex:none;
  border:1.5px solid #9aa3a8;border-radius:5px;background:#fff;cursor:pointer;position:relative;transition:.2s;
}
.gw-filter-form input[type="checkbox"]:checked{background:#79c3dd;border-color:#79c3dd;}
.gw-filter-form input[type="checkbox"]:checked::after{
  content:'';position:absolute;left:5px;top:1.5px;width:5px;height:10px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg);
}
.gw-filter-form .count{color:#9aa3a8;font-size:13px;}

/* Product page: Woo notices + cart form */
.woocommerce-notices-wrapper{margin:14px 0;}
.woocommerce-message,.woocommerce-info,.woocommerce-error{border-radius:14px;padding:14px 18px;background:#eef8fb;border:1px solid #a1dcec;list-style:none;}
.gw-cart-form .cta-row{display:flex;gap:12px;flex-wrap:wrap;}
.tab-panel .comment-form input,.tab-panel .comment-form textarea{width:100%;border:1px solid var(--line);border-radius:12px;padding:10px 14px;}


.wa-float{width:64px !important;height:64px !important;padding:0 !important;background:transparent !important;border-radius:50% !important;box-shadow:none !important;display:grid !important;place-items:center !important;filter:drop-shadow(0 8px 18px rgba(0,0,0,.22));transition:transform .25s ease !important;}
.wa-float:hover{background:transparent !important;transform:scale(1.06);}
.wa-float svg{width:64px !important;height:64px !important;display:block;}

/* Page loader */
#gw-loader{position:fixed;inset:0;z-index:9999;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;transition:opacity .45s ease,visibility .45s ease;}
#gw-loader.gw-hide{opacity:0;visibility:hidden;pointer-events:none;}
#gw-loader img{width:min(200px,48vw);height:auto;animation:gwBreath 1.8s ease-in-out infinite;}
#gw-loader .gw-dots{display:flex;gap:8px;}
#gw-loader .gw-dots span{width:8px;height:8px;border-radius:50%;background:#a1dcec;animation:gwDot 1.2s ease-in-out infinite;}
#gw-loader .gw-dots span:nth-child(2){animation-delay:.15s;background:#79c3dd;}
#gw-loader .gw-dots span:nth-child(3){animation-delay:.3s;background:#4c9cb8;}
@media (max-width:680px){
  #gw-loader{gap:14px;}
  #gw-loader img{width:min(120px,34vw);}
  #gw-loader .gw-dots{gap:6px;}
  #gw-loader .gw-dots span{width:6px;height:6px;}
}
@keyframes gwBreath{0%,100%{transform:scale(.96);opacity:.82;}50%{transform:scale(1.02);opacity:1;}}
@keyframes gwDot{0%,80%,100%{transform:translateY(0);opacity:.45;}40%{transform:translateY(-6px);opacity:1;}}
@media (prefers-reduced-motion:reduce){#gw-loader img,#gw-loader .gw-dots span{animation:none;}}

/* Order received (thank you) */
.woocommerce-order-received #gw-main{padding-top:40px;}
.gw-ty{max-width:880px;margin:0 auto;padding:10px 0 40px;font-family:var(--sans);color:var(--charcoal);}
.gw-ty-hero{text-align:center;padding:44px 24px;border-radius:26px;background:linear-gradient(120deg,#fbfeff 0%,#eef8fb 45%,#dcf1f8 100%);border:1px solid #a1dcec;}
.gw-ty-check{width:64px;height:64px;margin:0 auto 18px;border-radius:50%;background:#a1dcec;display:flex;align-items:center;justify-content:center;}
.gw-ty-hero h1{font-family:var(--serif);font-weight:500;font-size:40px;line-height:1.15;margin:0 0 10px;color:var(--charcoal);}
.gw-ty-hero p{font-size:16px;line-height:1.7;color:var(--charcoal-soft);margin:0 auto;max-width:520px;}
.gw-ty-hero .gw-ty-num{font-size:12.5px;letter-spacing:.14em;text-transform:uppercase;color:#2c6577;margin-bottom:10px;}
.gw-ty-h2{font-family:var(--serif);font-weight:500;font-size:30px;margin:40px 0 18px;text-align:center;color:var(--charcoal);}
.gw-ty-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:18px;}
.gw-ty-card{border:1px solid #a1dcec;background:#fff;border-radius:22px;padding:24px;}
.gw-ty-card h3{font-family:var(--serif);font-weight:500;font-size:24px;margin:0 0 12px;color:var(--charcoal);}
.gw-ty-row{display:flex;flex-direction:column;gap:2px;padding:10px 0;border-top:1px solid #e6e6e6;}
.gw-ty-row span{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--charcoal-soft);}
.gw-ty-row strong{font-size:14px;font-weight:500;color:var(--charcoal);word-break:break-all;}
.gw-ty-actions{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin-top:34px;}
.woocommerce-order-received .woocommerce-bacs-bank-details,
.woocommerce-order-received .woocommerce-order-overview,
.woocommerce-order-received .woocommerce-order-details,
.woocommerce-order-received .woocommerce-customer-details{display:none !important;}
@media (max-width:680px){
  .woocommerce-order-received #gw-main{padding-top:24px;}
  .gw-ty-hero{padding:34px 20px;}
  .gw-ty-hero h1{font-size:30px;}
  .gw-ty-hero p{font-size:15px;}
  .gw-ty-h2{font-size:26px;margin-top:32px;}
  .gw-ty-actions .btn{padding:12px 20px;font-size:11px;}
}

/* Required gifting fields */
.gw-req{color:#c0392b;margin-left:2px;}
.gw-cart-form input:user-invalid,.gw-cart-form textarea:user-invalid,.gw-cart-form select:user-invalid{border-color:#c0392b !important;}

.gw-opt{color:var(--charcoal-soft);font-size:.85em;margin-left:4px;}
