/* ==========================================================================
   DotProofs Elementor Widgets — Base Styles
   These provide sensible defaults that Elementor's style controls override.
   ========================================================================== */

/* --- Grid -------------------------------------------------------------- */
.dps-el-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

/* --- Card -------------------------------------------------------------- */
.dps-el-card {
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	transition: box-shadow .2s, transform .2s;
	box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.dps-hover-lift-yes .dps-el-card:hover {
	box-shadow: 0 12px 28px -8px rgba(0,0,0,.18);
	transform: translateY(-4px);
}
.dps-el-card-img {
	position: relative;
	padding-bottom: 75%;
	background: #f3f4f6;
	overflow: hidden;
}
.dps-el-card-img img {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.dps-el-badge {
	position: absolute; top: 12px; left: 12px;
	padding: 4px 12px; border-radius: 8px;
	background: #4f46e5; color: #fff;
	font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.dps-el-card-body {
	padding: 16px 18px 20px;
}
.dps-el-card-cat {
	font-size: 12px; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; font-weight: 600;
}
.dps-el-card-name {
	margin: 6px 0 4px; font-size: 16px; font-weight: 700; line-height: 1.3;
}
.dps-el-card-price {
	font-size: 18px; font-weight: 700; color: #111827;
}
.dps-el-card-price small { font-size: 13px; font-weight: 500; color: #6b7280; }
.dps-el-card-desc {
	margin-top: 6px; font-size: 13px; color: #6b7280; line-height: 1.5;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dps-el-card-btn {
	margin-top: 14px; padding: 10px 20px; border: none; border-radius: 10px;
	background: #4f46e5; color: #fff; font-size: 14px; font-weight: 600;
	cursor: pointer; transition: opacity .15s; width: 100%;
}
.dps-el-card-btn:hover { opacity: .88; }

/* --- Filters ----------------------------------------------------------- */
.dps-el-filter-wrap { margin-bottom: 20px; }
.dps-el-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.dps-el-filters--list { flex-direction: column; }
.dps-el-filter-btn {
	padding: 8px 18px; border: none; border-radius: 999px;
	background: #f3f4f6; color: #374151; font-size: 14px; font-weight: 500;
	cursor: pointer; transition: background .15s, color .15s;
}
.dps-el-filter-btn.is-active { background: #4f46e5; color: #fff; }
.dps-el-filter-btn:hover:not(.is-active) { background: #e5e7eb; }
.dps-el-filter-count { font-size: 12px; opacity: .7; }

.dps-el-search {
	margin-top: 12px; padding: 10px 14px; width: 100%; border: 1px solid #e5e7eb;
	border-radius: 10px; font-size: 14px; outline: none; transition: border-color .15s;
}
.dps-el-search:focus { border-color: #4f46e5; }

/* --- Cart button ------------------------------------------------------- */
.dps-el-cart-btn {
	position: relative; display: inline-flex; align-items: center; justify-content: center;
	gap: 8px; border: 1px solid #e5e7eb; background: #fff; color: #111827;
	width: 48px; height: 48px; border-radius: 12px; cursor: pointer;
	transition: box-shadow .15s, transform .1s;
}
.dps-el-cart-btn:hover { box-shadow: 0 8px 20px -12px rgba(0,0,0,.3); }
.dps-el-cart-badge {
	position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px;
	padding: 0 5px; border-radius: 999px; background: #4f46e5; color: #fff;
	font-size: 11px; font-weight: 700; display: grid; place-items: center;
}

/* --- Overlay (shared for modals & drawer) ------------------------------ */
.dps-el-overlay {
	position: fixed; inset: 0; z-index: 100000;
	display: flex; align-items: center; justify-content: center;
}
.dps-el-overlay-bg {
	position: absolute; inset: 0; background: rgba(17,24,39,.55); backdrop-filter: blur(2px);
}
.dps-el-overlay-card {
	position: relative; background: #fff; border-radius: 18px;
	max-width: 900px; width: 92vw; max-height: 90vh; overflow: auto;
	box-shadow: 0 30px 60px -20px rgba(0,0,0,.5);
}

/* --- Drawer ------------------------------------------------------------ */
.dps-el-drawer-overlay { justify-content: flex-end; }
.dps-el-drawer-panel {
	position: relative; height: 100%; display: flex; flex-direction: column;
	box-shadow: -20px 0 50px -20px rgba(0,0,0,.4);
	animation: dps-el-slide .2s ease;
}
@keyframes dps-el-slide { from { transform: translateX(100%); } to { transform: translateX(0); } }
.dps-el-drawer-head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 20px; border-bottom: 1px solid #e5e7eb;
}
.dps-el-drawer-head h3 { margin: 0; font-size: 18px; font-weight: 700; }
.dps-el-drawer-body { flex: 1; overflow: auto; padding: 12px 20px; }
.dps-el-drawer-foot { padding: 16px 20px; border-top: 1px solid #e5e7eb; }

.dps-el-x {
	width: 36px; height: 36px; border-radius: 50%; border: none;
	background: rgba(0,0,0,.06); font-size: 22px; cursor: pointer; line-height: 1;
}
.dps-el-x:hover { background: rgba(0,0,0,.12); }

/* --- Cart rows --------------------------------------------------------- */
.dps-el-cart-row {
	display: flex; align-items: flex-start; gap: 12px; padding: 14px 0;
	border-bottom: 1px solid #f3f4f6;
}
.dps-el-cart-thumb {
	width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #f3f4f6; flex-shrink: 0;
}
.dps-el-cart-info { flex: 1; min-width: 0; }
.dps-el-cart-name { font-weight: 700; font-size: 14px; }
.dps-el-cart-meta { font-size: 12px; color: #6b7280; }
.dps-el-cart-qty {
	display: inline-flex; align-items: center; gap: 8px; margin-top: 6px;
}
.dps-el-qty-sm {
	width: 28px; height: 28px; border-radius: 8px; border: 1px solid #e5e7eb;
	background: #fff; font-size: 16px; cursor: pointer; display: grid; place-items: center;
}
.dps-el-cart-line-price { font-weight: 700; font-size: 14px; white-space: nowrap; }
.dps-el-cart-remove {
	width: 28px; height: 28px; border-radius: 50%; border: none;
	background: transparent; font-size: 18px; color: #9ca3af; cursor: pointer; flex-shrink: 0;
}
.dps-el-cart-remove:hover { color: #ef4444; }
.dps-el-cart-subtotal {
	display: flex; justify-content: space-between; font-size: 16px; font-weight: 700;
	padding-bottom: 14px;
}

/* --- Product Detail ---------------------------------------------------- */
.dps-el-detail-layout { display: flex; gap: 40px; }
.dps-el-detail--side .dps-el-detail-img { width: 50%; flex-shrink: 0; }
.dps-el-detail--stacked { flex-direction: column; }
.dps-el-detail-img img, .dps-el-detail-main-img {
	width: 100%; border-radius: 16px; display: block;
}
.dps-el-detail-thumbs {
	display: flex; gap: 8px; margin-top: 12px;
}
.dps-el-thumb {
	width: 64px; height: 64px; border-radius: 10px; object-fit: cover;
	cursor: pointer; border: 2px solid transparent; transition: border-color .15s;
}
.dps-el-thumb.is-active { border-color: #4f46e5; }
.dps-el-detail-info { flex: 1; }
.dps-el-detail-cat {
	font-size: 12px; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; font-weight: 600;
}
.dps-el-detail-name { font-size: 28px; font-weight: 800; margin: 6px 0 10px; line-height: 1.2; }
.dps-el-detail-price { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.dps-el-detail-price small { font-size: 15px; font-weight: 500; color: #6b7280; }
.dps-el-detail-sku { font-size: 13px; color: #9ca3af; margin-bottom: 16px; }
.dps-el-detail-desc { font-size: 15px; line-height: 1.7; color: #374151; margin-bottom: 20px; }
.dps-el-detail-section { margin-bottom: 16px; }

.dps-el-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #374151; }

.dps-el-variant-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dps-el-variant-chip {
	padding: 8px 16px; border: 2px solid #e5e7eb; border-radius: 10px;
	background: #fff; font-size: 14px; font-weight: 500; cursor: pointer;
	transition: border-color .15s, background .15s;
}
.dps-el-variant-chip.is-active { border-color: #4f46e5; background: #eef2ff; }

.dps-el-select {
	width: 100%; padding: 10px 14px; border: 1px solid #e5e7eb; border-radius: 10px;
	font-size: 14px; background: #fff; outline: none;
}
.dps-el-select:focus { border-color: #4f46e5; }

.dps-el-qty {
	display: inline-flex; align-items: center; gap: 4px;
	border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden;
}
.dps-el-qty-btn {
	width: 40px; height: 40px; border: none; background: #f9fafb;
	font-size: 18px; cursor: pointer; display: grid; place-items: center;
}
.dps-el-qty-btn:hover { background: #f3f4f6; }
.dps-el-qty-input {
	width: 60px; height: 40px; border: none; text-align: center;
	font-size: 16px; font-weight: 600; outline: none;
	-moz-appearance: textfield;
}
.dps-el-qty-input::-webkit-outer-spin-button,
.dps-el-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dps-el-hint { font-size: 12px; color: #6b7280; margin-top: 4px; }

.dps-el-detail-atc {
	margin-top: 20px; padding: 14px 32px; border: none; border-radius: 10px;
	background: #4f46e5; color: #fff; font-size: 16px; font-weight: 700;
	cursor: pointer; transition: opacity .15s;
}
.dps-el-detail-atc:hover { opacity: .88; }
.dps-el-detail-msg { margin-top: 10px; }
.dps-el-toast {
	padding: 10px 18px; border-radius: 10px; background: #ecfdf5; color: #065f46;
	font-size: 14px; font-weight: 600;
}
.dps-el-back {
	display: inline-block; margin-bottom: 16px; font-size: 14px; color: #6b7280;
	text-decoration: none; transition: color .15s;
}
.dps-el-back:hover { color: #4f46e5; }

/* --- Checkout ---------------------------------------------------------- */
.dps-el-checkout {
	padding: 32px; max-width: 520px; margin: 0 auto;
}
.dps-el-checkout h2 { font-size: 22px; font-weight: 800; margin: 0 0 4px; }
.dps-el-step-sub { font-size: 14px; color: #6b7280; margin: 0 0 20px; }
.dps-el-checkout-summary { margin-bottom: 24px; }
.dps-el-summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.dps-el-summary-total { font-weight: 700; font-size: 16px; border-top: 1px solid #e5e7eb; padding-top: 10px; margin-top: 4px; }
.dps-el-checkout-fields { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.dps-el-input {
	padding: 10px 14px; border: 1px solid #e5e7eb; border-radius: 10px;
	font-size: 14px; outline: none; width: 100%;
}
.dps-el-input:focus { border-color: #4f46e5; }
.dps-el-card-placeholder {
	height: 44px; border: 1px solid #e5e7eb; border-radius: 10px;
	background: #f9fafb; margin-bottom: 16px;
}
.dps-el-pay-btn {
	width: 100%; padding: 14px; border: none; border-radius: 10px;
	background: #4f46e5; color: #fff; font-size: 16px; font-weight: 700;
	cursor: pointer; transition: opacity .15s;
}
.dps-el-pay-btn:hover { opacity: .88; }
.dps-el-pay-btn:disabled { opacity: .5; cursor: not-allowed; }
.dps-el-msg-err {
	padding: 12px 16px; border-radius: 10px; background: #fef2f2; color: #991b1b;
	font-size: 14px; margin-bottom: 12px;
}
.dps-el-link {
	display: inline-block; margin-top: 12px; color: #4f46e5; text-decoration: underline;
}

/* --- Shared utilities -------------------------------------------------- */
.dps-el-loading {
	text-align: center; padding: 40px 20px; color: #6b7280; font-size: 15px;
	grid-column: 1 / -1;
}
.dps-el-spinner {
	display: inline-block; width: 20px; height: 20px; border: 3px solid #e5e7eb;
	border-top-color: #4f46e5; border-radius: 50%; animation: dps-el-spin .6s linear infinite;
	vertical-align: middle; margin-right: 8px;
}
@keyframes dps-el-spin { to { transform: rotate(360deg); } }
.dps-el-empty {
	text-align: center; padding: 40px 20px; color: #9ca3af; font-size: 15px;
	grid-column: 1 / -1;
}
.dps-el-placeholder-img {
	background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
	padding-bottom: 75%;
}

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 767px) {
	.dps-el-detail--side { flex-direction: column; }
	.dps-el-detail--side .dps-el-detail-img { width: 100%; }
}

/* Subtle flash when a native button bound to the Add-to-Cart action fires.
   The cart drawer opening is the primary feedback, so keep this minimal so it
   never disfigures a fully custom-styled button. */
.dps-atc-added {
	animation: dps-atc-pulse 0.5s ease;
}
@keyframes dps-atc-pulse {
	0%   { opacity: 1; }
	50%  { opacity: 0.55; }
	100% { opacity: 1; }
}
